diff --git a/core/src/test/java/org/teavm/model/analysis/test/NullnessAnalysisTest.java b/core/src/test/java/org/teavm/model/analysis/test/NullnessAnalysisTest.java index 0101096bf..148da004e 100644 --- a/core/src/test/java/org/teavm/model/analysis/test/NullnessAnalysisTest.java +++ b/core/src/test/java/org/teavm/model/analysis/test/NullnessAnalysisTest.java @@ -29,6 +29,7 @@ import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; @@ -84,6 +85,12 @@ public class NullnessAnalysisTest { test(); } + @Test + @Ignore + public void nonDominatedBranch2() { + test(); + } + @Test public void exception() { test(); diff --git a/core/src/test/resources/model/analysis/nullness/nonDominatedBranch2.extended.txt b/core/src/test/resources/model/analysis/nullness/nonDominatedBranch2.extended.txt new file mode 100644 index 000000000..9b3101b78 --- /dev/null +++ b/core/src/test/resources/model/analysis/nullness/nonDominatedBranch2.extended.txt @@ -0,0 +1,10 @@ +var @this as this // 0 +$0 + @a := invokeStatic `Foo.f()LBar;` + if @a === null then goto $2 else goto $1 +$1 + goto $2 +$2 + @c := phi @a_1 from $0, @a_2 from $1 + @d := @a + return @c diff --git a/core/src/test/resources/model/analysis/nullness/nonDominatedBranch2.original.txt b/core/src/test/resources/model/analysis/nullness/nonDominatedBranch2.original.txt new file mode 100644 index 000000000..036d96a51 --- /dev/null +++ b/core/src/test/resources/model/analysis/nullness/nonDominatedBranch2.original.txt @@ -0,0 +1,11 @@ +var @this as this + +$start + @a := invokeStatic `Foo.f()LBar;` + if @a === null then goto $joint else goto $ifNonNull +$ifNonNull + goto $joint +$joint + @c := phi @a from $start, @a from $ifNonNull + @d := @a + return @c \ No newline at end of file