Created
December 25, 2019 09:33
-
-
Save aromal-sasidharan/f5bad389212553bfdf292a81f0720d14 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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