Skip to content

Commit 61a2e77

Browse files
committed
fix tests
1 parent 9b2c972 commit 61a2e77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Application/HydraScript.Application.StaticAnalysis/Visitors/SemanticChecker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public Type Visit(BinaryExpression visitable)
256256
"++" when lType is ArrayType { Type: Any } && rType is ArrayType { Type: Any } =>
257257
throw new CannotDefineType(visitable.Segment),
258258
"++" => lType is ArrayType lArrType && rType is ArrayType rArrType
259-
? lArrType.Type is Any ? rArrType.Type : lArrType.Type
259+
? lArrType.Type is not Any ? lArrType : rArrType.Type is not Any ? rArrType : throw new CannotDefineType(visitable.Segment)
260260
: throw new UnsupportedOperation(visitable.Segment, lType, visitable.Operator),
261261
"::" when lType is not ArrayType =>
262262
throw new UnsupportedOperation(visitable.Segment, lType, visitable.Operator),

0 commit comments

Comments
 (0)