浏览代码

Allow explicit conversion on set types

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7751 8c9fc860-2736-0410-a75d-ab315db34111
eth.negelef 7 年之前
父节点
当前提交
ec4bc8d41f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      source/FoxSemanticChecker.Mod

+ 1 - 1
source/FoxSemanticChecker.Mod

@@ -6343,7 +6343,7 @@ TYPE
 						IF ((type IS SyntaxTree.NumberType) OR (type IS SyntaxTree.AddressType) OR (type IS SyntaxTree.SizeType)) &
 							((expressionType IS SyntaxTree.NumberType) OR (expressionType IS SyntaxTree.AddressType) OR (expressionType IS SyntaxTree.SizeType)
 							OR (expressionType IS SyntaxTree.EnumerationType)
-							) THEN
+							) OR ((type IS SyntaxTree.SetType) & (expression.type IS SyntaxTree.SetType)) THEN
 							IF ((type IS SyntaxTree.AddressType) OR (type IS SyntaxTree.IntegerType) & (~type(SyntaxTree.IntegerType).signed)) & (expressionType IS SyntaxTree.FloatType) THEN
 								Error(left.position,"invalid unsigned type in explicit conversion");
 							ELSE