We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18e9d8f commit b22a477Copy full SHA for b22a477
tests/neg/i19762.check
@@ -0,0 +1,6 @@
1
+-- [E019] Syntax Error: tests/neg/i19762.scala:8:31 --------------------------------------------------------------------
2
+8 | def combine(x: Int, y: Int)) = x + y // error
3
+ | ^
4
+ | Missing return type
5
+ |
6
+ | longer explanation available when compiling with `-explain`
tests/neg/i19762.scala
@@ -0,0 +1,8 @@
+trait Monoid[A]:
+ def combine(x: A, y: A): A
+ def empty: A
+
+object Monoid:
+ lazy val addInt: Monoid[Int] = new:
7
+ val empty = 0
8
+ def combine(x: Int, y: Int)) = x + y // error
0 commit comments