Guest User

Untitled

a guest
Jun 24th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. fun myMethod(thing: T){}
  2.  
  3. class MyClass : IMyInterface{}
  4.  
  5. interface IMyInterface <T>{
  6. fun myMethod(thing: T){}
  7. }
  8.  
  9. class MyClass: IMyInterface<MyClass>{
  10. fun myMethod(thing: MyClass){} // <<<-- the type is set because I explicitly set it above
  11. }
  12.  
  13. interface IMyInterface{
  14. fun myMethod(thing: T){}
  15. }
  16.  
  17. class MyClass: IMyInterface{
  18. fun myMethod(thing: MyClass){} // <<<-- the type is set because I explicitly set it above
  19. }
Add Comment
Please, Sign In to add comment