diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-11-20 20:10:02 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-11-20 20:10:02 +0000 |
| commit | 51a0d5a8b6db54368872dc3df9ade204f47c59c7 (patch) | |
| tree | 10f6640f1f924cb9fea737c122eb0b6268f183a9 /src/test/java/org/shedlang/compiler/stackir | |
| parent | 23c76b64213fbe54dafd5bbf6b9d10efb051d16d (diff) | |
Store mutability of bound variables in namespace node
Diffstat (limited to 'src/test/java/org/shedlang/compiler/stackir')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/stackir/StackCompilerNamespaceTests.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/java/org/shedlang/compiler/stackir/StackCompilerNamespaceTests.java b/src/test/java/org/shedlang/compiler/stackir/StackCompilerNamespaceTests.java index e6206b9a..322bf49f 100644 --- a/src/test/java/org/shedlang/compiler/stackir/StackCompilerNamespaceTests.java +++ b/src/test/java/org/shedlang/compiler/stackir/StackCompilerNamespaceTests.java @@ -27,7 +27,7 @@ public class StackCompilerNamespaceTests { .addStatement(Typed.expressionStatement(Typed.stringLiteral("hello"))) .build() ), - List.of("f"), + List.of(BoundVariable.immutable("f")), List.of("f") ); @@ -53,9 +53,9 @@ public class StackCompilerNamespaceTests { public void importsAreLoaded() { var node = TypedNamespaceNode.builder() .addImport(Typed.import_(NamespaceName.of("A"))) - .addBoundVariableName("A") + .addBoundVariable(BoundVariable.immutable("A")) .addImport(Typed.import_(NamespaceName.of("B"))) - .addBoundVariableName("B") + .addBoundVariable(BoundVariable.immutable("B")) .build(); var stackIrNamespace = StackCompiler.compileNamespace(node); @@ -87,7 +87,7 @@ public class StackCompilerNamespaceTests { .withType(structType) .build() ), - List.of("f", "None"), + List.of(BoundVariable.immutable("f"), BoundVariable.immutable("None")), List.of("f", "None") ); |
