diff --git a/tests/neg/i6801.scala b/tests/neg/i6801.scala new file mode 100644 index 000000000000..f6ef3dfbcd8b --- /dev/null +++ b/tests/neg/i6801.scala @@ -0,0 +1,5 @@ +delegate MyNumericOps[T] { + def (x: T) +(y: T) given (n: Numeric[T]): T = n.plus(x,y) +} +def foo[T: Numeric](x: T) = 1f + x // error: no implicit argument of type Numeric[Any] +def bar[T: Numeric](x: T) = x + 1f // error: no implicit argument of type Numeric[Any] \ No newline at end of file