diff options
author | Burak Emir <emir@epfl.ch> | 2006-12-10 15:08:55 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2006-12-10 15:08:55 +0000 |
commit | 593deb5d5004162a35a98277900d2baeb40c09c8 (patch) | |
tree | 38a14fa9db389d2feabfd6910b611f29730b3326 | |
parent | e794df0beb2f6c72bbfe5cfe1a9ab4de603280b1 (diff) | |
download | scala-593deb5d5004162a35a98277900d2baeb40c09c8.tar.gz scala-593deb5d5004162a35a98277900d2baeb40c09c8.tar.bz2 scala-593deb5d5004162a35a98277900d2baeb40c09c8.zip |
fixed bug when matching chars and int
-rw-r--r-- | src/compiler/scala/tools/nsc/matching/PatternMatchers.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/PatternMatchers.scala b/src/compiler/scala/tools/nsc/matching/PatternMatchers.scala index f704703490..45ff87c4de 100644 --- a/src/compiler/scala/tools/nsc/matching/PatternMatchers.scala +++ b/src/compiler/scala/tools/nsc/matching/PatternMatchers.scala @@ -918,6 +918,20 @@ print() node.and.bodyToTree(), mappings); node = node.or; + + case ConstantPat( value: Char )=> + mappings = insert1(value.toInt,node.and.bodyToTree(),mappings); + node = node.or; + +/* + case ConstantPat( value: Byte )=> + mappings = insert1(value.toInt,node.and.bodyToTree(),mappings); + node = node.or; + + case ConstantPat( value: Short )=> + mappings = insert1(value.toInt,node.and.bodyToTree(),mappings); + node = node.or; +*/ // these correct? } } patNode = patNode.nextH() |