Files
Nim/tests/errmsgs/tgenericconstraint.nim
Timothee Cour e40ff24c23 typeToString: type float => typedesc[float] (#17011)
* typeToString: type float => typedesc[float]

* fixup

* fix tests
2021-02-12 17:10:20 +01:00

16 lines
208 B
Nim

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