another attempt to make test green again
This commit is contained in:
parent
b7a1cad4a4
commit
fa98edc78c
3 changed files with 11 additions and 3 deletions
|
|
@ -60,8 +60,8 @@ type
|
||||||
proc sameMethodBucket(a, b: PSym): MethodResult =
|
proc sameMethodBucket(a, b: PSym): MethodResult =
|
||||||
if a.name.id != b.name.id: return
|
if a.name.id != b.name.id: return
|
||||||
if sonsLen(a.typ) != sonsLen(b.typ):
|
if sonsLen(a.typ) != sonsLen(b.typ):
|
||||||
return # check for return type:
|
return
|
||||||
if not sameTypeOrNil(a.typ.sons[0], b.typ.sons[0]): return
|
|
||||||
for i in countup(1, sonsLen(a.typ) - 1):
|
for i in countup(1, sonsLen(a.typ) - 1):
|
||||||
var aa = a.typ.sons[i]
|
var aa = a.typ.sons[i]
|
||||||
var bb = b.typ.sons[i]
|
var bb = b.typ.sons[i]
|
||||||
|
|
@ -89,6 +89,14 @@ proc sameMethodBucket(a, b: PSym): MethodResult =
|
||||||
return No
|
return No
|
||||||
else:
|
else:
|
||||||
return No
|
return No
|
||||||
|
if result == Yes:
|
||||||
|
# check for return type:
|
||||||
|
if not sameTypeOrNil(a.typ.sons[0], b.typ.sons[0]):
|
||||||
|
if b.typ.sons[0] != nil and b.typ.sons[0].kind == tyExpr:
|
||||||
|
# infer 'auto' from the base to make it consistent:
|
||||||
|
b.typ.sons[0] = a.typ.sons[0]
|
||||||
|
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
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,7 @@ proc recompileFullProject(graph: ModuleGraph; cache: IdentCache) =
|
||||||
graph.resetAllModules()
|
graph.resetAllModules()
|
||||||
GC_fullcollect()
|
GC_fullcollect()
|
||||||
compileProject(graph, cache)
|
compileProject(graph, cache)
|
||||||
echo "recompiled!"
|
echo GC_getStatistics()
|
||||||
|
|
||||||
proc mainThread(graph: ModuleGraph; cache: IdentCache) =
|
proc mainThread(graph: ModuleGraph; cache: IdentCache) =
|
||||||
if gLogging:
|
if gLogging:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue