diff options
Diffstat (limited to 'test/401-optimizing-compiler/src/Main.java')
-rw-r--r-- | test/401-optimizing-compiler/src/Main.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/401-optimizing-compiler/src/Main.java b/test/401-optimizing-compiler/src/Main.java index 7c3fd25..a1e62b3 100644 --- a/test/401-optimizing-compiler/src/Main.java +++ b/test/401-optimizing-compiler/src/Main.java @@ -110,6 +110,11 @@ public class Main { if (result != 42) { throw new Error("Unexpected result: " + result); } + + String s = $opt$StringInit(); + if (!s.equals("hello world")) { + throw new Error("Unexpected string: " + s); + } } public static void invokePrivate() { @@ -230,5 +235,9 @@ public class Main { return array.length; } + public static String $opt$StringInit() { + return new String("hello world"); + } + Object o; } |