Advertisement
Guest User

Untitled

a guest
May 29th, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.36 KB | None | 0 0
  1. class Parent
  2. end
  3.  
  4. class Child1 < Parent
  5. end
  6.  
  7. class Child2 < Parent
  8. end
  9.  
  10. puts [Child2, Child1, 12]
  11.  
  12. > Error in ./arraytest.cr:10: no overload matches 'Pointer((Int32 | Parent+:Class))#[]=' with types Int32, Child2:Class
  13. > Overloads are:
  14. >  - Pointer((Int32 | Parent+:Class))#[]=(offset, value : (Int32 | Parent+:Class))
  15. >
  16. > puts [Child2, Child1, 12]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement