summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2010-09-14 15:11:28 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2010-09-14 15:11:28 +0000
commit5824594015d7a8871e14ad694100b3503bfdef1c (patch)
tree7b5e72bffff01828380e6998c248e22ae4057584
parent3b8129c77b9426a621163d4e5bf54943f58692a1 (diff)
downloadscala-5824594015d7a8871e14ad694100b3503bfdef1c.tar.gz
scala-5824594015d7a8871e14ad694100b3503bfdef1c.tar.bz2
scala-5824594015d7a8871e14ad694100b3503bfdef1c.zip
Close #3835, review by extempore
-rw-r--r--src/compiler/scala/tools/nsc/ast/TreeInfo.scala2
-rw-r--r--test/files/run/t3835.check2
-rw-r--r--test/files/run/t3835.scala4
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 })
+}