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

                                  
             
                    
                                  








                             
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]