tuple field names are ignored
This commit is contained in:
parent
75b7917b3a
commit
c0cc62c6b1
9 changed files with 29 additions and 40 deletions
|
|
@ -349,7 +349,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: return isNone
|
||||
if x.name.id != y.name.id and f.kind != tyTuple: 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