Created
March 2, 2017 04:11
-
-
Save tylerarnold/e821f24f27b2e6a36a004c2c6d319526 to your computer and use it in GitHub Desktop.
swift 3.0 bug or deliberate behavior? At minimum a confusing error code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
protocol namer { | |
func name() -> String | |
} | |
extension namer { | |
func name() -> String { | |
return "foo" | |
} | |
} | |
class DemoClass: namer { | |
init () { | |
} | |
func demoNameInstance() -> String { | |
let n = name() | |
return n | |
} | |
class func demoNameClass() -> String { | |
let n = name() | |
return n | |
} | |
} | |
let a = DemoClass() | |
let b = a.demoNameInstance() | |
let c = DemoClass.demoNameClass() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment