diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-07 13:56:54 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-07 13:56:54 +0100 |
commit | b0fca1abe35d45b64ed6bbd2edd12f63e8999c5d (patch) | |
tree | 6193cd85aaa3084c40597470d4ca782b91a0018c /src/compiler | |
parent | 60154183002f66a7aa96dc3515ccd9ecc1b5a3dd (diff) | |
download | scala-b0fca1abe35d45b64ed6bbd2edd12f63e8999c5d.tar.gz scala-b0fca1abe35d45b64ed6bbd2edd12f63e8999c5d.tar.bz2 scala-b0fca1abe35d45b64ed6bbd2edd12f63e8999c5d.zip |
does away with resetAllAttrs in typedLabelDef
Again, resetLocalAttrs works just fine there - no need to destroy
references to externally defined symbols.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 101e1526fe..982218ce8f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -2307,7 +2307,8 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper context.scope.unlink(ldef.symbol) val sym2 = namer.enterInScope( context.owner.newLabel(ldef.name, ldef.pos) setInfo MethodType(List(), restpe)) - val rhs2 = typed(resetAllAttrs(ldef.rhs), restpe) + val LabelDef(_, _, rhs1) = resetLocalAttrs(ldef) + val rhs2 = typed(rhs1, restpe) ldef.params foreach (param => param setType param.symbol.tpe) deriveLabelDef(ldef)(_ => rhs2) setSymbol sym2 setType restpe } |