From aad7c67fe047c6ea9b40ff9588adf0b51dbcf57b Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Mon, 29 Jun 2015 01:05:06 -0700 Subject: SI-6810 Test for CR --- test/files/neg/t6810.check | 12 +++++++++--- test/files/neg/t6810.scala | 4 ++++ 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'test/files') diff --git a/test/files/neg/t6810.check b/test/files/neg/t6810.check index 8b0e6715aa..497ef35070 100644 --- a/test/files/neg/t6810.check +++ b/test/files/neg/t6810.check @@ -16,7 +16,13 @@ t6810.scala:20: error: unclosed quoted identifier t6810.scala:21: error: unclosed quoted identifier ` = EOL // not raw string literals aka triple-quoted, multiline strings ^ -t6810.scala:22: error: '=' expected but '}' found. -} +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 = ' ^ -7 errors found +9 errors found diff --git a/test/files/neg/t6810.scala b/test/files/neg/t6810.scala index a9d8813389..50c305d70c 100644 --- a/test/files/neg/t6810.scala +++ b/test/files/neg/t6810.scala @@ -19,4 +19,8 @@ trait t6810 { val `\u000A` = EOL // backquoted identifiers are arbitrary string literals val ` ` = EOL // not raw string literals aka triple-quoted, multiline strings + + val a = '\u000D' // similar treatment of CR + val b = ' ' // CR seen as EOL by scanner + val c = '\r' // traditionally } -- cgit v1.2.3