forked from scala/scala
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request scala#4590 from som-snytt/issue/6810
SI-6810 Disallow EOL in char literal
- Loading branch information
Showing
5 changed files
with
89 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
t6810.scala:4: error: unclosed character literal | ||
val y = ' | ||
^ | ||
t6810.scala:5: error: unclosed character literal | ||
' // but not embedded EOL sequences not represented as escapes | ||
^ | ||
t6810.scala:9: error: unclosed string literal | ||
val Y = " | ||
^ | ||
t6810.scala:10: error: unclosed string literal | ||
" // obviously not | ||
^ | ||
t6810.scala:20: error: unclosed quoted identifier | ||
val ` | ||
^ | ||
t6810.scala:21: error: unclosed quoted identifier | ||
` = EOL // not raw string literals aka triple-quoted, multiline strings | ||
^ | ||
t6810.scala:24: error: unclosed character literal | ||
val b = ' | ||
^ | ||
t6810.scala:25: error: unclosed character literal | ||
' // CR seen as EOL by scanner | ||
^ | ||
t6810.scala:24: error: '=' expected but ';' found. | ||
val b = ' | ||
^ | ||
9 errors found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters