t10735.nim 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. discard """
  2. cmd: "nim check $file"
  3. errormsg: "illformed AST: case buf[pos]"
  4. nimout: '''
  5. t10735.nim(43, 5) Error: 'let' symbol requires an initialization
  6. t10735.nim(44, 10) Error: undeclared identifier: 'pos'
  7. t10735.nim(44, 10) Error: expression 'pos' has no type (or is ambiguous)
  8. t10735.nim(44, 10) Error: expression 'pos' has no type (or is ambiguous)
  9. t10735.nim(44, 9) Error: type mismatch: got <cstring, >
  10. but expected one of:
  11. proc `[]`(s: string; i: BackwardsIndex): char
  12. first type mismatch at position: 0
  13. proc `[]`(s: var string; i: BackwardsIndex): var char
  14. first type mismatch at position: 0
  15. proc `[]`[I: Ordinal; T](a: T; i: I): T
  16. first type mismatch at position: 0
  17. proc `[]`[Idx, T; U, V: Ordinal](a: array[Idx, T]; x: HSlice[U, V]): seq[T]
  18. first type mismatch at position: 0
  19. proc `[]`[Idx, T](a: array[Idx, T]; i: BackwardsIndex): T
  20. first type mismatch at position: 0
  21. proc `[]`[Idx, T](a: var array[Idx, T]; i: BackwardsIndex): var T
  22. first type mismatch at position: 0
  23. proc `[]`[T, U: Ordinal](s: string; x: HSlice[T, U]): string
  24. first type mismatch at position: 0
  25. proc `[]`[T; U, V: Ordinal](s: openArray[T]; x: HSlice[U, V]): seq[T]
  26. first type mismatch at position: 0
  27. proc `[]`[T](s: openArray[T]; i: BackwardsIndex): T
  28. first type mismatch at position: 0
  29. proc `[]`[T](s: var openArray[T]; i: BackwardsIndex): var T
  30. first type mismatch at position: 0
  31. template `[]`(a: WideCStringObj; idx: int): Utf16Char
  32. first type mismatch at position: 0
  33. template `[]`(s: string; i: int): char
  34. first type mismatch at position: 0
  35. expression: `[]`(buf, pos)
  36. t10735.nim(44, 9) Error: expression '' has no type (or is ambiguous)
  37. t10735.nim(46, 3) Error: illformed AST: case buf[pos]
  38. '''
  39. joinable: false
  40. """
  41. let buf: cstring
  42. case buf[pos]
  43. else:
  44. case buf[pos]