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

22 lines
267 B
Nim

discard """
errormsg: "cannot instantiate B"
line: 20
nimout: '''
got: (type string)
but expected: (T: A)
'''
"""
type
A = concept c
advance(c)
B[T: A] = object
child: ref B[T]
proc advance(x: int): int = x + 1
var a: B[int]
var b: B[string]