aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/shedlang/compiler/typechecker/TypeCheckerFunctionBodyTests.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/java/org/shedlang/compiler/typechecker/TypeCheckerFunctionBodyTests.java b/src/test/java/org/shedlang/compiler/typechecker/TypeCheckerFunctionBodyTests.java
index 6ac002b1..04445758 100644
--- a/src/test/java/org/shedlang/compiler/typechecker/TypeCheckerFunctionBodyTests.java
+++ b/src/test/java/org/shedlang/compiler/typechecker/TypeCheckerFunctionBodyTests.java
@@ -477,6 +477,7 @@ public class TypeCheckerFunctionBodyTests {
public void boundVariablesAreSet() {
var untyped = Untyped.block(List.of(
Untyped.val("local1", Untyped.intLiteral(1)),
+ Untyped.assign(Untyped.targetVar("localMutable"), Untyped.intLiteral(3)),
Untyped.expressionStatement(Untyped.reference("y")),
Untyped.expressionStatement(Untyped.if_(
List.of(
@@ -508,7 +509,8 @@ public class TypeCheckerFunctionBodyTests {
.withBlock(isTypedBlockNodeWithBoundVariables(containsExactly(
equalTo(BoundVariable.immutable("argPositional")),
equalTo(BoundVariable.immutable("argNamed")),
- equalTo(BoundVariable.immutable("local1"))
+ equalTo(BoundVariable.immutable("local1")),
+ equalTo(BoundVariable.mutable("localMutable"))
)))
);
}