summary refs log blame commit diff stats
path: root/tests/errmsgs/tgenericconstraint.nim
blob: e3093fead96dd75ff0c2da0031162834fb54be0a (plain) (tree)
1
2
3
4
5
6


                                  
                                  







                             
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]