revert to old behaviour: tuple field names are not ignored anymore; fixes #1920
This commit is contained in:
parent
a2b7e6c392
commit
abb738146a
9 changed files with 40 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue