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 #8282 from som-snytt/forward/charlit
Reject char literal of raw newline
- Loading branch information
Showing
6 changed files
with
99 additions
and
15 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,24 @@ | ||
-- Error: tests/neg/t6810.scala:5:10 ----------------------------------------------------------------------------------- | ||
5 | val y = ' | ||
| ^ | ||
| unclosed character literal | ||
-- Error: tests/neg/t6810.scala:12:10 ---------------------------------------------------------------------------------- | ||
12 | val Y = " | ||
| ^ | ||
| unclosed string literal | ||
-- Error: tests/neg/t6810.scala:13:0 ----------------------------------------------------------------------------------- | ||
13 |" // error obviously not | ||
|^ | ||
|unclosed string literal | ||
-- Error: tests/neg/t6810.scala:24:6 ----------------------------------------------------------------------------------- | ||
24 | val ` | ||
| ^ | ||
| unclosed quoted identifier | ||
-- Error: tests/neg/t6810.scala:25:0 ----------------------------------------------------------------------------------- | ||
25 |` = EOL // error not raw string literals aka triple-quoted, multiline strings | ||
|^ | ||
|unclosed quoted identifier | ||
-- Error: tests/neg/t6810.scala:30:10 ---------------------------------------------------------------------------------- | ||
30 | val b = ' | ||
| ^ | ||
| unclosed character literal |
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,5 @@ | ||
object Foo { | ||
def bar: Int = "LOL" | ||
|
||
// anypos-error | ||
} |