summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala7
-rw-r--r--test/files/run/t7932.check3
-rw-r--r--test/files/run/t7932.scala11
3 files changed, 19 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index 60c1553ef3..4db74e70f2 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -238,8 +238,11 @@ abstract class Erasure extends AddInterfaces
if (!(AnyRefTpe <:< bounds.hi)) "+" + boxedSig(bounds.hi)
else if (!(bounds.lo <:< NullTpe)) "-" + boxedSig(bounds.lo)
else "*"
- } else {
- boxedSig(tp)
+ } else tp match {
+ case PolyType(_, res) =>
+ "*" // SI-7932
+ case _ =>
+ boxedSig(tp)
}
def classSig = {
val preRebound = pre.baseType(sym.owner) // #2585
diff --git a/test/files/run/t7932.check b/test/files/run/t7932.check
new file mode 100644
index 0000000000..13d64f1d3c
--- /dev/null
+++ b/test/files/run/t7932.check
@@ -0,0 +1,3 @@
+warning: there were 1 feature warning(s); re-run with -feature for details
+public Category<?> C.category()
+public Category<scala.Tuple2> C.category1()
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"))
+}