File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/compiler/scala/tools/nsc/typechecker Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -395,12 +395,13 @@ trait MethodSynthesis {
395
395
// starts compiling (instead of failing like it's supposed to) because the typer
396
396
// expects to be able to identify escaping locals in typedDefDef, and fails to
397
397
// spot that brand of them. In other words it's an artifact of the implementation.
398
- val tpt = derivedSym.tpe_* .finalResultType.widen match {
398
+ val getterTp = derivedSym.tpe_* .finalResultType
399
+ val tpt = getterTp.widen match {
399
400
// Range position errors ensue if we don't duplicate this in some
400
401
// circumstances (at least: concrete vals with existential types.)
401
- case ExistentialType (_, _) => TypeTree () setOriginal (tree.tpt.duplicate setPos tree.tpt.pos.focus)
402
- case _ if isDeferred => TypeTree () setOriginal tree.tpt // keep type tree of original abstract field
403
- case tp => TypeTree (tp )
402
+ case _ : ExistentialType => TypeTree () setOriginal (tree.tpt.duplicate setPos tree.tpt.pos.focus)
403
+ case _ if isDeferred => TypeTree () setOriginal tree.tpt // keep type tree of original abstract field
404
+ case _ => TypeTree (getterTp )
404
405
}
405
406
tpt setPos tree.tpt.pos.focus
406
407
}
You can’t perform that action at this time.
0 commit comments