From 51a0d5a8b6db54368872dc3df9ade204f47c59c7 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 20 Nov 2023 20:10:02 +0000 Subject: Store mutability of bound variables in namespace node --- .../shedlang/compiler/stackir/StackCompilerNamespaceTests.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test/java/org/shedlang/compiler/stackir') 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") ); -- cgit v1.2.3