diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/TreeInfo.scala | 2 | ||||
-rw-r--r-- | test/files/run/t3835.check | 2 | ||||
-rw-r--r-- | test/files/run/t3835.scala | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeInfo.scala b/src/compiler/scala/tools/nsc/ast/TreeInfo.scala index 394e9709a1..88f161f22d 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeInfo.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeInfo.scala @@ -210,7 +210,7 @@ abstract class TreeInfo { /** Is name a variable name? */ def isVariableName(name: Name): Boolean = { val first = name(0) - (('a' <= first && first <= 'z') || first == '_') && !(reserved contains name) + ((first.isLower && first.isLetter) || first == '_') && !(reserved contains name) } /** Is tree a this node which belongs to `enclClass'? */ diff --git a/test/files/run/t3835.check b/test/files/run/t3835.check new file mode 100644 index 0000000000..995415951d --- /dev/null +++ b/test/files/run/t3835.check @@ -0,0 +1,2 @@ +6 +1 diff --git a/test/files/run/t3835.scala b/test/files/run/t3835.scala new file mode 100644 index 0000000000..1f0e35a89a --- /dev/null +++ b/test/files/run/t3835.scala @@ -0,0 +1,4 @@ +object Test extends Application { + println((1, 2, 3) match { case (r, \u03b8, \u03c6) => r + \u03b8 + \u03c6 }) + println(1 match { case \u00e9 => \u00e9 }) +} |