Skip to content

Commit 3d8a70f

Browse files
committed
Add test that crashes without -source 3.3
1 parent c00f214 commit 3d8a70f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/neg/i20265-1.check

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Error: tests/neg/i20265-1.scala:4:6 ---------------------------------------------------------------------------------
2+
4 | def apply(args: Tuple.Map[m.MirroredElemTypes, Expr]): Expr[T] = ??? // error
3+
| ^
4+
| non-private method apply in trait Ops refers to private given instance m
5+
| in its type signature (args: Tuple.Map[Ops.this.m.MirroredElemTypes, Expr]): Expr[T]

tests/neg/i20265-1.scala

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
trait Expr[T]
2+
3+
trait Ops[T](using m: scala.deriving.Mirror.ProductOf[T]) {
4+
def apply(args: Tuple.Map[m.MirroredElemTypes, Expr]): Expr[T] = ??? // error
5+
}
6+
7+
case class P(a: Int)
8+
object P extends Ops[P]
9+

0 commit comments

Comments
 (0)