Files
Nim/tests/errmsgs/tgenericconstraint.nim
2021-04-06 16:20:01 +02:00

15 lines
197 B
Nim

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