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 feed938 + c519222 commit 4336453Copy full SHA for 4336453
tests/warn/i17429.check
@@ -0,0 +1,6 @@
1
+-- Warning: tests/warn/i17429.scala:3:17 -------------------------------------------------------------------------------
2
+3 | println(A(1) plus A(2)) // warn
3
+ | ^^^^
4
+ | Alphanumeric method plus is not declared infix; it should not be used as infix operator.
5
+ | Instead, use method syntax .plus(...) or backticked identifier `plus`.
6
+ | The latter can be rewritten automatically under -rewrite -source 3.4-migration.
tests/warn/i17429.scala
@@ -0,0 +1,3 @@
+case class A(a:Int):
+ def plus(a:A) = A(this.a+a.a)
+ println(A(1) plus A(2)) // warn
0 commit comments