Files
Nim/tests/errmsgs/tgenericconstraint.nim

16 lines
203 B
Nim

discard """
errormsg: "cannot instantiate B"
line: 14
nimout: '''
got: <type int>
but expected: <T: string or float>
'''
"""
type
B[T: string|float] = object
child: ref B[T]
var b: B[int]