fixes #3305; error message will improve with later improvements for concepts
This commit is contained in:
parent
36f68e1650
commit
1c0b815282
1 changed files with 3 additions and 0 deletions
|
|
@ -511,6 +511,9 @@ proc typeRangeRel(f, a: PType): TTypeRelation {.noinline.} =
|
|||
proc matchUserTypeClass*(c: PContext, m: var TCandidate,
|
||||
ff, a: PType): TTypeRelation =
|
||||
var body = ff.skipTypes({tyUserTypeClassInst})
|
||||
if c.inTypeClass > 20:
|
||||
localError(body.n[3].info, $body.n[3] & " too nested for type matching")
|
||||
return isNone
|
||||
|
||||
openScope(c)
|
||||
inc c.inTypeClass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue