Skip to content

Instantly share code, notes, and snippets.

@haoyu-c
Last active April 30, 2020 15:46
Show Gist options
  • Save haoyu-c/e62c1c51cbc025074dce3c5e3f5c5547 to your computer and use it in GitHub Desktop.
Save haoyu-c/e62c1c51cbc025074dce3c5e3f5c5547 to your computer and use it in GitHub Desktop.
struct Test {
func aMethod() {}
}
class Test1 {
func aMethod() {}
}
class Test2 {
func aMethod() {}
}
class Test2Subclass: Test2 {
override func aMethod() {}
}
extension Test2Subclass {
func aExtensionMethod() {}
}
final class Test2FinalSubclass: Test2 {
override func aMethod() {}
}
let test = Test()
test.aMethod()
let test1 = Test1()
test1.aMethod()
let test2Subclass = Test2Subclass()
test2Subclass.aMethod()
test2Subclass.aExtensionMethod()
let test2Final = Test2FinalSubclass()
test2Final.aMethod()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment