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.
2 parents e59cd6c + 6d52b0e commit ef62605Copy full SHA for ef62605
tests/neg/i6801.scala
@@ -0,0 +1,5 @@
1
+delegate MyNumericOps[T] {
2
+ def (x: T) +(y: T) given (n: Numeric[T]): T = n.plus(x,y)
3
+}
4
+def foo[T: Numeric](x: T) = 1f + x // error: no implicit argument of type Numeric[Any]
5
+def bar[T: Numeric](x: T) = x + 1f // error: no implicit argument of type Numeric[Any]
0 commit comments