summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-05-06 12:00:12 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-05-06 12:00:12 +0200
commitf5df207f95087c38b2936429cf793d63f0b68c24 (patch)
tree2ab6327f993d14feac3c8356ed4f8176a42f9666 /src
parent7cac6334d4437ff54c4979799574045501f64135 (diff)
downloadscala-f5df207f95087c38b2936429cf793d63f0b68c24.tar.gz
scala-f5df207f95087c38b2936429cf793d63f0b68c24.tar.bz2
scala-f5df207f95087c38b2936429cf793d63f0b68c24.zip
Don't hop to the first enclosing, non-silent context when typing refinements.
Closes SI-5305. This reverts a few lines of e5cfe47a19, which was a remedy for SI-3614 and SI-3856*. I added a test case for the former, the latter was already tested. Both tests pass after this change, and they do so with the old and new pattern matcher. But does this change still "avoid trees with null types in presentation compiler"? What was the intent of the context hopping in the first place? * Based on this comment: https://issues.scala-lang.org/browse/SI-3614?focusedCommentId=50477&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-50477, which elaborates further than the commit comment of e5cfe47a19.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 5902e480a3..9555280ecd 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2498,10 +2498,7 @@ trait Typers extends Modes with Adaptations with Taggings {
namer.enterSyms(stats)
// need to delay rest of typedRefinement to avoid cyclic reference errors
unit.toCheck += { () =>
- // go to next outer context which is not silent, see #3614
- var c = context
- while (c.bufferErrors) c = c.outer
- val stats1 = newTyper(c).typedStats(stats, NoSymbol)
+ val stats1 = typedStats(stats, NoSymbol)
for (stat <- stats1 if stat.isDef) {
val member = stat.symbol
if (!(context.owner.ancestors forall