From 926585a3f36f35c9afc3f9ed9fe0ded72f6b7014 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 23 Jul 2014 09:56:24 +0200 Subject: SI-8743 Fix crasher with poly-methods annotated with @varargs The code that generated the Java varargs forwarder was basing things on the `ValDef-s` of the parameters of the source method. But, their types refer to a type parameter skolems of the enclosing method, which led to a type mismatch when typechecking the forwarder. Instead, I've reworked the code to simply use the `DefDef`-s symbol's info, which *doesn't* refer to skolems. This actually simplifies the surrounding code somewhat; rather than repeated symbols in a map we can just time travel the pre-uncurry method signatures to figure out which params are releated. --- test/files/jvm/varargs/JavaClass.java | 1 + 1 file changed, 1 insertion(+) (limited to 'test/files/jvm/varargs/JavaClass.java') diff --git a/test/files/jvm/varargs/JavaClass.java b/test/files/jvm/varargs/JavaClass.java index 9851e1b78b..6928ee5adc 100644 --- a/test/files/jvm/varargs/JavaClass.java +++ b/test/files/jvm/varargs/JavaClass.java @@ -11,5 +11,6 @@ public class JavaClass { va.vi(1, 2, 3, 4); varargz(5, 1.0, 2.0, 3.0); va.vt(16, "", "", ""); + System.out.println(va.vt1(16, "a", "b", "c")); } } \ No newline at end of file -- cgit v1.2.3