Files
Nim/tests/errmsgs/tgenericconstraint.nim
Zahary Karadjov a6006e56a7 Fix #4737
2017-06-20 11:29:42 +02:00

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]