t22753.nim 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. discard """
  2. cmd: "nim check --hints:off $file"
  3. errormsg: "type mismatch"
  4. nimoutFull: true
  5. nimout: '''
  6. t22753.nim(34, 13) Error: array expects two type parameters
  7. t22753.nim(35, 1) Error: expression 'x' has no type (or is ambiguous)
  8. t22753.nim(35, 1) Error: expression 'x' has no type (or is ambiguous)
  9. t22753.nim(35, 2) Error: type mismatch: got <>
  10. but expected one of:
  11. proc `[]=`(s: var string; i: BackwardsIndex; x: char)
  12. first type mismatch at position: 0
  13. proc `[]=`[I: Ordinal; T, S](a: T; i: I; x: sink S)
  14. first type mismatch at position: 0
  15. proc `[]=`[Idx, T; U, V: Ordinal](a: var array[Idx, T]; x: HSlice[U, V];
  16. b: openArray[T])
  17. first type mismatch at position: 0
  18. proc `[]=`[Idx, T](a: var array[Idx, T]; i: BackwardsIndex; x: T)
  19. first type mismatch at position: 0
  20. proc `[]=`[T, U: Ordinal](s: var string; x: HSlice[T, U]; b: string)
  21. first type mismatch at position: 0
  22. proc `[]=`[T; U, V: Ordinal](s: var seq[T]; x: HSlice[U, V]; b: openArray[T])
  23. first type mismatch at position: 0
  24. proc `[]=`[T](s: var openArray[T]; i: BackwardsIndex; x: T)
  25. first type mismatch at position: 0
  26. template `[]=`(a: WideCStringObj; idx: int; val: Utf16Char)
  27. first type mismatch at position: 0
  28. template `[]=`(s: string; i: int; val: char)
  29. first type mismatch at position: 0
  30. expression: `[]=`(x, 0, 9)
  31. '''
  32. """
  33. var x: array[3] # bug #22753
  34. x[0] = 9