Skip to content

Commit d4048f2

Browse files
committed
Additional test to exercise another infix error message
1 parent 4ef6e32 commit d4048f2

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/neg/leading-infix-miss.check

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-- [E008] Not Found Error: tests/neg/leading-infix-miss.scala:3:2 ------------------------------------------------------
2+
2 | val x = false
3+
3 | ! true // error // error
4+
| ^
5+
| value ! is not a member of Boolean.
6+
| Note that `!` is treated as an infix operator in Scala 3.
7+
| If you do not want that, insert a `;` or empty line in front
8+
| or drop any spaces behind the operator.
9+
-- [E007] Type Mismatch Error: tests/neg/leading-infix-miss.scala:3:8 --------------------------------------------------
10+
3 | ! true // error // error
11+
| ^
12+
| Found: Unit
13+
| Required: Boolean

tests/neg/leading-infix-miss.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def test: Boolean =
2+
val x = false
3+
! true // error // error

0 commit comments

Comments
 (0)