diff options
author | Burak Emir <emir@epfl.ch> | 2007-07-06 14:07:47 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2007-07-06 14:07:47 +0000 |
commit | 6b9c0247506e46321dfedaa01b37a9696cb21014 (patch) | |
tree | ad78698d2748df594e1d4b7c2ff7bbbc71c7fa68 | |
parent | ad89e1d2ffa6860b771bb7753b5cac93f1b24fa4 (diff) | |
download | scala-6b9c0247506e46321dfedaa01b37a9696cb21014.tar.gz scala-6b9c0247506e46321dfedaa01b37a9696cb21014.tar.bz2 scala-6b9c0247506e46321dfedaa01b37a9696cb21014.zip |
implemented #1134, matching on this-identifiers
-rw-r--r-- | src/compiler/scala/tools/nsc/matching/TransMatcher.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/TransMatcher.scala b/src/compiler/scala/tools/nsc/matching/TransMatcher.scala index b6f9206432..5a17202a78 100644 --- a/src/compiler/scala/tools/nsc/matching/TransMatcher.scala +++ b/src/compiler/scala/tools/nsc/matching/TransMatcher.scala @@ -246,10 +246,14 @@ trait TransMatcher { self: transform.ExplicitOuter => case Typed(_, _) => pat + case This(_) => // Sean's feature request #1134, compiled incorrectly + val stpe = mkThisType(pat.tpe.symbol) + Typed(Ident(nme.WILDCARD) setType stpe, TypeTree(stpe)) + //case _ => // Console.println(pat); // Console.println(pat.getClass()); - // scala.Predef.error"( what is this ? ") + // scala.Predef.error(" what is this ? ") } var res: List[CaseDef] = Nil |