twitter / rsc

Experimental Scala compiler focused on compilation speed
Apache License 2.0
1.24k stars 54 forks source link

Incorrect type parameter ascription when extending from nonpolymorphic trait with polymorphic grandparent class #456

Closed wiwa closed 5 years ago

wiwa commented 5 years ago
  class C[A]

  trait T extends C[Int]

  class D extends T
--- obtained
+++ expected
@@ -7,3 +7,3 @@
∙
-  class D extends T[Int]
+  class D extends T
 }

Basically, RscCompat will incorrectly ascribe type parameters to the extends trait. This also happens when C is abstract class but not when it's a trait.

wiwa commented 5 years ago

https://github.com/scalameta/scalameta/issues/1887