Skip to content

Commit

Permalink
Add test that crashes without -source 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
wjoel committed Jan 26, 2025
1 parent c00f214 commit 3d8a70f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/neg/i20265-1.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- Error: tests/neg/i20265-1.scala:4:6 ---------------------------------------------------------------------------------
4 | def apply(args: Tuple.Map[m.MirroredElemTypes, Expr]): Expr[T] = ??? // error
| ^
| non-private method apply in trait Ops refers to private given instance m
| in its type signature (args: Tuple.Map[Ops.this.m.MirroredElemTypes, Expr]): Expr[T]
9 changes: 9 additions & 0 deletions tests/neg/i20265-1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
trait Expr[T]

trait Ops[T](using m: scala.deriving.Mirror.ProductOf[T]) {
def apply(args: Tuple.Map[m.MirroredElemTypes, Expr]): Expr[T] = ??? // error
}

case class P(a: Int)
object P extends Ops[P]

0 comments on commit 3d8a70f

Please sign in to comment.