Skip to content

Instantly share code, notes, and snippets.

@aromal-sasidharan
Created December 25, 2019 09:33
Show Gist options
  • Save aromal-sasidharan/f5bad389212553bfdf292a81f0720d14 to your computer and use it in GitHub Desktop.
Save aromal-sasidharan/f5bad389212553bfdf292a81f0720d14 to your computer and use it in GitHub Desktop.
import UIKit
var str = "Hello, playground"
protocol A {
func hello()
}
protocol B: A {
func hello2()
}
class AA: A {
func hello() {
print("AA")
}
}
class BB: AA, B {
func hello2() {
print("BB")
}
}
let b: B = BB()
//b.hello2()
//b.hello()
let a: A? = b
a?.hello()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment