Guest User

Untitled

a guest
Dec 15th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. class GenericClass<T> {
  2. let value: T
  3.  
  4. init(_ value: T) {
  5. self.value = value
  6. }
  7. }
  8.  
  9. let gc = GenericClass<Int?>(1)
  10. let value = gc.value // This value is of type Int?. How to get Int then?
Add Comment
Please, Sign In to add comment