Guest User

Untitled

a guest
Feb 3rd, 2020
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.18 KB | None | 0 0
  1.  
  2. class Basic: Decodable {}
  3. class Child: Basic {}
  4.  
  5. var type: Basic.Type = Child.self
  6.  
  7. func doAction<T: Basic>(_ type: T.Type) {
  8.     print(T.self, type)
  9. }
  10.  
  11. doAction(type)
Advertisement
Add Comment
Please, Sign In to add comment