From a18e42bc0773084a3e311646e1e2ffd623db4cfa Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 5 May 2015 09:59:43 +1000 Subject: SI-9298 Fix erasure of value classes in Java Value classes that appear in signatures of Java defined methods should not be erased to the underlying type. Before this change, we'd get a `ClassCastException`, as the Scala call site would unbox the value class despite the fact the Java recipient would expect the boxed representation. I've tested this for primitive and object wrapped types in parameter and return position. --- test/files/run/t9298/Test.java | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/run/t9298/Test.java (limited to 'test/files/run/t9298/Test.java') diff --git a/test/files/run/t9298/Test.java b/test/files/run/t9298/Test.java new file mode 100644 index 0000000000..81f5265985 --- /dev/null +++ b/test/files/run/t9298/Test.java @@ -0,0 +1,7 @@ +public class Test { + public void consume(VC vc) {} + + public static void main(String[] args) { + new Client().test(); + } +} -- cgit v1.2.3