tsubscriptmismatch_legacy.nim 182 B

1234567891011
  1. discard """
  2. nimout: '''
  3. but expression 'x' is of type: Foo
  4. '''
  5. """
  6. type Foo = object
  7. let x = Foo()
  8. discard x[1] #[tt.Error
  9. ^ type mismatch: got <Foo, int literal(1)>]#