浏览代码

Ensure arg decls have been semanted before comparing. Fixes #314

woollybah 7 年之前
父节点
当前提交
73bfa6e5de
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      decl.bmx

+ 4 - 0
decl.bmx

@@ -1831,6 +1831,10 @@ Type TFuncDecl Extends TBlockDecl
 	Method EqualsArgs:Int( decl:TFuncDecl ) ' careful, this is not commutative!
 		If argDecls.Length<>decl.argDecls.Length Return False
 		For Local i:Int=0 Until argDecls.Length
+			' ensure arg decls have been semanted
+			decl.argDecls[i].Semant()
+			argDecls[i].Semant()
+			
 			' objects can be subclasses as well as the same.
 			If TObjectType(decl.argDecls[i].ty) Then
 				If Not decl.argDecls[i].ty.EqualsType( argDecls[i].ty ) And Not decl.argDecls[i].ty.ExtendsType( argDecls[i].ty ) Return False