fixes #4428
This commit is contained in:
parent
9eb909baf9
commit
2d8572e948
2 changed files with 9 additions and 3 deletions
|
|
@ -69,15 +69,21 @@ proc sameMethodBucket(a, b: PSym): MethodResult =
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
if sameType(aa, bb):
|
if sameType(aa, bb):
|
||||||
if aa.kind == tyObject and result != Invalid: result = Yes
|
if aa.kind == tyObject and result != Invalid:
|
||||||
|
result = Yes
|
||||||
elif aa.kind == tyObject and bb.kind == tyObject:
|
elif aa.kind == tyObject and bb.kind == tyObject:
|
||||||
let diff = inheritanceDiff(bb, aa)
|
let diff = inheritanceDiff(bb, aa)
|
||||||
if diff < 0:
|
if diff < 0:
|
||||||
if result != Invalid: result = Yes
|
if result != Invalid:
|
||||||
|
result = Yes
|
||||||
|
else:
|
||||||
|
return No
|
||||||
elif diff != high(int):
|
elif diff != high(int):
|
||||||
result = Invalid
|
result = Invalid
|
||||||
else:
|
else:
|
||||||
return No
|
return No
|
||||||
|
else:
|
||||||
|
return No
|
||||||
|
|
||||||
proc attachDispatcher(s: PSym, dispatcher: PNode) =
|
proc attachDispatcher(s: PSym, dispatcher: PNode) =
|
||||||
var L = s.ast.len-1
|
var L = s.ast.len-1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue