From bfc5c55e90320248e5571834f640ff88de8392e7 Mon Sep 17 00:00:00 2001 From: "pl@gohorb.ba-horb.de" Date: Wed, 3 Aug 2022 15:18:55 +0200 Subject: [PATCH] modified: ../../../../pom.xml modified: ../../java/targetast/TphTest.java modified: ../bytecode/javFiles/Tph.jav new file: ../bytecode/javFiles/Tph7.jav --- pom.xml | 4 ++-- src/test/java/targetast/TphTest.java | 3 +++ src/test/resources/bytecode/javFiles/Tph.jav | 1 - src/test/resources/bytecode/javFiles/Tph7.jav | 11 +++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 src/test/resources/bytecode/javFiles/Tph7.jav diff --git a/pom.xml b/pom.xml index 3f7cc7e3b..c2ee12306 100644 --- a/pom.xml +++ b/pom.xml @@ -122,8 +122,8 @@ http://maven.apache.org/maven-v4_0_0.xsd"> org.apache.maven.plugins maven-compiler-plugin - 17 - 17 + 18 + 18 --enable-preview diff --git a/src/test/java/targetast/TphTest.java b/src/test/java/targetast/TphTest.java index c2bb98359..198bea5bc 100644 --- a/src/test/java/targetast/TphTest.java +++ b/src/test/java/targetast/TphTest.java @@ -18,6 +18,9 @@ public class TphTest { var classFiles = TestCodegen.generateClassFiles("Tph.jav", new ByteArrayClassLoader()); classToTest = classFiles.get("Tph"); instanceOfClass = classToTest.getDeclaredConstructor().newInstance(); + classFiles = TestCodegen.generateClassFiles("Tph7.jav", new ByteArrayClassLoader()); + classToTest = classFiles.get("Tph7"); + instanceOfClass = classToTest.getDeclaredConstructor().newInstance(); } @Test diff --git a/src/test/resources/bytecode/javFiles/Tph.jav b/src/test/resources/bytecode/javFiles/Tph.jav index 9faa570cf..3f9d0aab3 100644 --- a/src/test/resources/bytecode/javFiles/Tph.jav +++ b/src/test/resources/bytecode/javFiles/Tph.jav @@ -3,7 +3,6 @@ public class Tph { m(a,b){ var c = m2(b); return a; -// return m2(b); } m2(b){ diff --git a/src/test/resources/bytecode/javFiles/Tph7.jav b/src/test/resources/bytecode/javFiles/Tph7.jav new file mode 100644 index 000000000..cc55afb5c --- /dev/null +++ b/src/test/resources/bytecode/javFiles/Tph7.jav @@ -0,0 +1,11 @@ +public class Tph7 { + + m(a,b){ + var c = m2(b); + return m2(b); + } + + m2(b){ + return b; + } +} \ No newline at end of file