Skip to content

Commit 0116580

Browse files
committed
Add neg test to show it no longer crashes
1 parent a2a5dbf commit 0116580

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/neg/i3703.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package bar {
2+
trait M[F[_]]
3+
class S[XS[_] <: M[XS], A](val x: XS[A])
4+
object S {
5+
def apply[X[_] <: M[X], A](x: X[A]): S[X, A] = S[X, A](x)
6+
def unapply[X[_] <: M[X], A](p: S[X, A]): S[X, A] = S(p.x) // error, scalac allows this but dotty fails to infer the type arguments.
7+
}
8+
}
9+
10+
11+

0 commit comments

Comments
 (0)