From 4f4ee871c9f57d94bc954a5d372736849edb7901 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 18 Feb 2014 13:19:22 +0100 Subject: SI-7932 Exclude PolyTypes from Java generic signatures In the enclosed test case, we were emitting just the result type of `[a, b]Float` in the Java generic signature. This resulted in a `GenericSignatureFormatError`. This commit changes `argSig` to project such type functions to `*` instead. The test case shows that we still emit the class when we use its type constructor directly as the type argument. --- test/files/run/t7932.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/files/run/t7932.scala (limited to 'test/files/run/t7932.scala') diff --git a/test/files/run/t7932.scala b/test/files/run/t7932.scala new file mode 100644 index 0000000000..8743abff88 --- /dev/null +++ b/test/files/run/t7932.scala @@ -0,0 +1,11 @@ +class Category[M[_, _]] +trait M[F] { + type X[a, b] = F + def category: Category[X] = null + def category1: Category[Tuple2] = null +} +abstract class C extends M[Float] +object Test extends App { + val ms = classOf[C].getMethods.filter(_.getName.startsWith("category")) + println(ms.map(_.toGenericString).sorted.mkString("\n")) +} -- cgit v1.2.3