Skip to content

Commit fd4be37

Browse files
committed
Test interpolation of keyword
1 parent 1f47f64 commit fd4be37

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
-- Error: tests/neg-custom-args/fatal-warnings/i13440.scala:3:13 -------------------------------------------------------
2-
3 |case class A(enum: List[Int] = Nil) // error
1+
-- Error: tests/neg-custom-args/fatal-warnings/i13440.scala:3:4 --------------------------------------------------------
2+
3 |def given = 42 // error
3+
| ^
4+
| given is now a keyword, write `given` instead of given to keep it as an identifier
5+
-- Error: tests/neg-custom-args/fatal-warnings/i13440.scala:5:13 -------------------------------------------------------
6+
5 |case class C(enum: List[Int] = Nil) { // error
37
| ^
48
| enum is now a keyword, write `enum` instead of enum to keep it as an identifier
9+
-- Error: tests/neg-custom-args/fatal-warnings/i13440.scala:6:11 -------------------------------------------------------
10+
6 | val s = s"$enum" // error
11+
| ^
12+
| enum is now a keyword, write `enum` instead of enum to keep it as an identifier
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
import language.`3.0-migration`
22

3-
case class A(enum: List[Int] = Nil) // error
3+
def given = 42 // error
4+
5+
case class C(enum: List[Int] = Nil) { // error
6+
val s = s"$enum" // error
7+
}

0 commit comments

Comments
 (0)