We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 639b51a commit 4447d41Copy full SHA for 4447d41
tests/warn/i15503f.scala
@@ -75,3 +75,18 @@ package givens:
75
given namely (using x: X): Y with // warn protected param to given class
76
def doY = "8"
77
end givens
78
+
79
+object i22895:
80
+ trait Test[F[_], Ev] {
81
+ def apply[A, B](fa: F[A])(f: A => B)(using ev: Ev): F[B]
82
+ }
83
+ given testId: Test[[a] =>> a, Unit] =
84
+ new Test[[a] =>> a, Unit] {
85
+ def apply[A, B](fa: A)(f: A => B)(using ev: Unit): B = f(fa) // nowarn override
86
87
+ class C:
88
+ def f(using s: String) = s.toInt
89
+ class D(i: Int) extends C:
90
+ override def f(using String) = compute(i) // nowarn override
91
+ def g(using sss: String) = compute(i) // warn
92
+ def compute(i: Int) = i * 42 // returning a class param is deemed trivial, make it non-trivial
0 commit comments