diff options
author | Som Snytt <som.snytt@gmail.com> | 2016-06-07 00:38:01 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2016-06-07 00:38:01 -0700 |
commit | 3f3a3bb57499fb919e798d03bbc4e84ede8e55d6 (patch) | |
tree | 2534b059102e501140e2d3bf9fc7c76f7ef0e721 /src/compiler/scala | |
parent | 650fbee7855c7162bf3cf23cb8340704274834d9 (diff) | |
download | scala-3f3a3bb57499fb919e798d03bbc4e84ede8e55d6.tar.gz scala-3f3a3bb57499fb919e798d03bbc4e84ede8e55d6.tar.bz2 scala-3f3a3bb57499fb919e798d03bbc4e84ede8e55d6.zip |
SI-9245 Fresher name in Try and test
Fresh name for catcher gets a dollar. "Here, have a dollar."
Test due to retronym demonstrates possible conflict.
Over the lifetime of the universe, surely at least one code
monkey would type in that identifier to catch a banana.
Diffstat (limited to 'src/compiler/scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala index cc9e39f430..45f731686a 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala @@ -105,7 +105,7 @@ abstract class TreeBuilder { def makeCatchFromExpr(catchExpr: Tree): CaseDef = { val binder = freshTermName() val pat = Bind(binder, Typed(Ident(nme.WILDCARD), Ident(tpnme.Throwable))) - val catchDef = ValDef(Modifiers(ARTIFACT), freshTermName("catchExpr"), TypeTree(), catchExpr) + val catchDef = ValDef(Modifiers(ARTIFACT), freshTermName("catchExpr$"), TypeTree(), catchExpr) val catchFn = Ident(catchDef.name) val body = atPos(catchExpr.pos.makeTransparent)(Block( List(catchDef), |