Guest User

Untitled

a guest
Sep 7th, 2014
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. var num = 1
  2.  
  3. proc `[]`(v: ptr int, index: float) =
  4. echo index
  5.  
  6. addr(num)[3.4]
  7.  
  8. #ERROR: Test.nim(6, 9) Error: type mismatch: got (int, float)
  9. # but expected one of:
  10. # Test.[](v: ptr int, index: float)
  11. # system.[](a: array[Idx, T], x: TSlice[Idx]): seq[T]
  12. # system.[](a: array[Idx, T], x: TSlice[int]): seq[T]
  13. # system.[](s: string, x: TSlice[int]): string
  14. # system.[](s: seq[T], x: TSlice[int]): seq[T]
  15. # > Process terminated with exit code 256
Advertisement
Add Comment
Please, Sign In to add comment