tsubscriptmismatch.nim 232 B

123456789101112
  1. discard """
  2. matrix: "-d:testsConciseTypeMismatch"
  3. nimout: '''
  4. [1] proc `[]`[T; U, V: Ordinal](s: openArray[T]; x: HSlice[U, V]): seq[T]
  5. '''
  6. """
  7. type Foo = object
  8. let x = Foo()
  9. discard x[1] #[tt.Error
  10. ^ type mismatch]#