summaryrefslogtreecommitdiff
path: root/chapter15/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'chapter15/src/test/java')
-rw-r--r--chapter15/src/test/java/com/seaofnodes/simple/Chapter15Test.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/chapter15/src/test/java/com/seaofnodes/simple/Chapter15Test.java b/chapter15/src/test/java/com/seaofnodes/simple/Chapter15Test.java
index dff39ba3..88924c52 100644
--- a/chapter15/src/test/java/com/seaofnodes/simple/Chapter15Test.java
+++ b/chapter15/src/test/java/com/seaofnodes/simple/Chapter15Test.java
@@ -181,6 +181,19 @@ return root;
assertEquals("Obj<Tree>{_kids=Obj<*Tree?[]>{#=2,[]=[Obj<Tree>{_kids=null},null]}}", Evaluator.evaluate(stop, 0).toString());
}
+ @Test
+ public void testNestedStructAddMemProj() {
+ Parser parser = new Parser(
+"""
+struct S {
+ int a;
+ int[] b;
+}
+return 0;
+""");
+ StopNode stop = parser.parse(false);
+ assertEquals("return 0;", stop.toString());
+ }
@Test
public void testRollingSum() {