Skip to content

Commit

Permalink
Test interpolation of keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed Oct 31, 2021
1 parent 1f47f64 commit fd4be37
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 10 additions & 2 deletions tests/neg-custom-args/fatal-warnings/i13440.check
@@ -1,4 +1,12 @@
-- Error: tests/neg-custom-args/fatal-warnings/i13440.scala:3:13 -------------------------------------------------------
3 |case class A(enum: List[Int] = Nil) // error
-- Error: tests/neg-custom-args/fatal-warnings/i13440.scala:3:4 --------------------------------------------------------
3 |def given = 42 // error
| ^
| given is now a keyword, write `given` instead of given to keep it as an identifier
-- Error: tests/neg-custom-args/fatal-warnings/i13440.scala:5:13 -------------------------------------------------------
5 |case class C(enum: List[Int] = Nil) { // error
| ^
| enum is now a keyword, write `enum` instead of enum to keep it as an identifier
-- Error: tests/neg-custom-args/fatal-warnings/i13440.scala:6:11 -------------------------------------------------------
6 | val s = s"$enum" // error
| ^
| enum is now a keyword, write `enum` instead of enum to keep it as an identifier
6 changes: 5 additions & 1 deletion tests/neg-custom-args/fatal-warnings/i13440.scala
@@ -1,3 +1,7 @@
import language.`3.0-migration`

case class A(enum: List[Int] = Nil) // error
def given = 42 // error

case class C(enum: List[Int] = Nil) { // error
val s = s"$enum" // error
}

0 comments on commit fd4be37

Please sign in to comment.