This commit is contained in:
Araq 2015-10-22 12:12:05 +02:00
commit 9cc25f8b77
3 changed files with 41 additions and 2 deletions

View file

@ -684,6 +684,13 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
of tyAnything:
return if f.kind == tyAnything: isGeneric
else: isNone
of tyUserTypeClass, tyUserTypeClassInst:
# consider this: 'var g: Node' *within* a concept where 'Node'
# is a concept too (tgraph)
let x = typeRel(c, a, f, false)
if x >= isGeneric:
return isGeneric
else: discard
case f.kind