Explorar o código

Fixed missing distance calculation for set types

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7719 8c9fc860-2736-0410-a75d-ab315db34111
negelef %!s(int64=7) %!d(string=hai) anos
pai
achega
dce98a4ac9
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      source/FoxGlobal.Mod

+ 3 - 2
source/FoxGlobal.Mod

@@ -1592,8 +1592,9 @@ TYPE
 			WHILE toSize >= fromSize DO
 				toSize := toSize DIV 2; INC(distance);
 			END;
-		ELSIF (from IS SyntaxTree.CharacterType) & (to IS SyntaxTree.CharacterType) & (toSize >= fromSize)  OR
-			(from IS SyntaxTree.FloatType) & (to IS SyntaxTree.FloatType) & (toSize >= fromSize) 
+		ELSIF (from IS SyntaxTree.CharacterType) & (to IS SyntaxTree.CharacterType) & (toSize >= fromSize) OR
+			(from IS SyntaxTree.FloatType) & (to IS SyntaxTree.FloatType) & (toSize >= fromSize) OR
+			(from IS SyntaxTree.SetType) & (to IS SyntaxTree.SetType) & (toSize >= fromSize)
 		THEN
 			WHILE toSize >= fromSize DO
 				toSize := toSize DIV 2; INC(distance);