diff options
author | Martin Odersky <odersky@gmail.com> | 2005-12-01 15:35:45 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2005-12-01 15:35:45 +0000 |
commit | 1ddf7e4b1551c3229e5191aa3127b93e290f0345 (patch) | |
tree | 44681d7f4ba43386e4dc5d910790e96e595f3ad1 /sources/scala | |
parent | 09e5446bd38a91f097b19549e5d7f1342b6bbfc4 (diff) | |
download | scala-1ddf7e4b1551c3229e5191aa3127b93e290f0345.tar.gz scala-1ddf7e4b1551c3229e5191aa3127b93e290f0345.tar.bz2 scala-1ddf7e4b1551c3229e5191aa3127b93e290f0345.zip |
*** empty log message ***
Diffstat (limited to 'sources/scala')
-rw-r--r-- | sources/scala/tools/nsc/matching/PatternMatchers.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sources/scala/tools/nsc/matching/PatternMatchers.scala b/sources/scala/tools/nsc/matching/PatternMatchers.scala index 592ce40827..1dbcdabffe 100644 --- a/sources/scala/tools/nsc/matching/PatternMatchers.scala +++ b/sources/scala/tools/nsc/matching/PatternMatchers.scala @@ -810,12 +810,16 @@ trait PatternMatchers: (TransMatcher with PatternNodes) extends AnyRef with Patt bound = Predef.Array[Array[ValDef]]( Predef.Array[ValDef]() ); var i = guard.length - 1; while(i >= 0) { val ts:Seq[Tree] = bound(i).asInstanceOf[Array[Tree]]; + val temp = currentOwner.newValue(body(i).pos, cunit.fresh.newName("r$")) + setFlag Flags.SYNTHETIC setInfo body(i).tpe; var res0: Tree = //Block( // List(Assign(Ident(resultVar), body(i))), // Literal(Constant(true))); Block( - List(Apply(Ident(exit), List(body(i)))), + List( + ValDef(temp, body(i)), + Apply(Ident(exit), List(Ident(temp)))), Literal(Constant(true)) ); // forward jump if (guard(i) != EmptyTree) |