revert to old behaviour: tuple field names are not ignored anymore; fixes #1920

This commit is contained in:
Araq 2015-01-18 02:33:28 +01:00
commit abb738146a
9 changed files with 40 additions and 17 deletions

View file

@ -357,7 +357,7 @@ proc recordRel(c: var TCandidate, f, a: PType): TTypeRelation =
var y = a.n.sons[i].sym
if f.kind == tyObject and typeRel(c, x.typ, y.typ) < isSubtype:
return isNone
if x.name.id != y.name.id and f.kind != tyTuple: return isNone
if x.name.id != y.name.id: return isNone
proc allowsNil(f: PType): TTypeRelation {.inline.} =
result = if tfNotNil notin f.flags: isSubtype else: isNone