From 88e2366eab67b3866a97e43f266b1969f277a073 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 26 Sep 2018 16:21:10 +0200 Subject: [PATCH] ListenerOverload Test --- test/javFiles/ListenerOverload.jav | 20 ++++++++++++++++++++ test/typeinference/JavaTXCompilerTest.java | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 test/javFiles/ListenerOverload.jav diff --git a/test/javFiles/ListenerOverload.jav b/test/javFiles/ListenerOverload.jav new file mode 100644 index 000000000..e1a8d65d8 --- /dev/null +++ b/test/javFiles/ListenerOverload.jav @@ -0,0 +1,20 @@ +import java.lang.Integer; +import java.lang.String; + +class ListenerOverload{ + +call(p){ + call(p.left); + call(p.right); +} + +call(Integer i){} + +call(String s){} + +} + +class Pair{ + A left; + B right; +} \ No newline at end of file diff --git a/test/typeinference/JavaTXCompilerTest.java b/test/typeinference/JavaTXCompilerTest.java index 30b6feae6..233e8b24a 100644 --- a/test/typeinference/JavaTXCompilerTest.java +++ b/test/typeinference/JavaTXCompilerTest.java @@ -104,6 +104,10 @@ public class JavaTXCompilerTest { public void multipleSolutions() throws IOException, ClassNotFoundException { execute(new File(rootDirectory+"Sorting.jav")); } + @Test + public void listenerTest() throws IOException, ClassNotFoundException { + execute(new File(rootDirectory+"ListenerOverload.jav")); + } private static class TestResultSet{