Explorar o código

Allowed assignment from procedure type to address type

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6719 8c9fc860-2736-0410-a75d-ab315db34111
felixf %!s(int64=9) %!d(string=hai) anos
pai
achega
c4b63423fe
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      source/FoxSemanticChecker.Mod

+ 1 - 1
source/FoxSemanticChecker.Mod

@@ -8735,7 +8735,7 @@ TYPE
 					result := IsCharacterType(this)
 				ELSIF (to IS SyntaxTree.SizeType) & ((this IS SyntaxTree.SizeType) OR (this IS SyntaxTree.IntegerType) OR (this IS SyntaxTree.AddressType)) THEN
 					result := to.sizeInBits >= this.sizeInBits (*! weak compatibility: signed size type may be assigned with unsigned address type of same size *)
-				ELSIF (to IS SyntaxTree.AddressType) & ((this IS SyntaxTree.AddressType) OR (this IS SyntaxTree.IntegerType) OR (this IS SyntaxTree.SizeType) OR IsPointerType(this)) THEN
+				ELSIF (to IS SyntaxTree.AddressType) & ((this IS SyntaxTree.AddressType) OR (this IS SyntaxTree.IntegerType) OR (this IS SyntaxTree.SizeType) OR IsPointerType(this) OR (this IS SyntaxTree.ProcedureType)) THEN
 					result := to.sizeInBits >= this.sizeInBits; (*! weak compatibility: addresses may be assigned with signed integer *)
 				ELSIF (to IS SyntaxTree.RangeType) & (this IS SyntaxTree.RangeType) THEN
 					result := TRUE;