summary refs log tree commit diff stats
path: root/tests/errmsgs/tgenericmismatchsegfault_legacy.nim
blob: 1532611b90af2bde3c309ec9fa496a8e48f5861f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
template v[T](c: SomeOrdinal): T = T(c)
discard v[int, char]('A') #[tt.Error
                    ^ type mismatch: got <char>
but expected one of:
template v[T](c: SomeOrdinal): T
  first type mismatch at position: 2 in generic parameters
  required type for SomeOrdinal: SomeOrdinal
  but expression 'char' is of type: char

expression: v[int, char]('A')]#