Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- class A { required init() {} }
- class AA : A {}
- class AB : A {}
- func a<SomeType:A>() -> SomeType
- {
- return SomeType()
- }
- func a<SomeType:A>() -> SomeType?
- {
- return nil
- }
- let first : AA? = a()
- let second : AA = a()
- let third : AB? = a()
- let fourth : AB = a()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement