[#1061] | project: compiler | priority: low | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Martin | Burak | fixed | 2007-04-20 16:28:47.0 | |
subject | Pattern matcher throws many Errors | |||
code |
// ParallelMatching lines 79ff case _ if (pat.symbol ne null) && /* Martin: the following causes a lot of Error's in rebind/singletonType these errors are masked by including the two tests below. However, if you uncomment them you will get a bug in genLoad: ^ [locker] java.lang.AssertionError: assertion failed: Trying to access the this of another class: tree.symbol = class TreeBrowsers, ctx.clazz.symbol = object TreeBrowsers$TreeInfo compilation unit:TreeBrowsers.scala [locker] at scala.Predef$.assert(Predef.scala:90) [locker] at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:809) [locker] at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genLoadQualifier(GenICode.scala:996) [locker] at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:785) (pat.symbol != NoSymbol) && pat.symbol.tpe.prefix.isStable && */ (patternType =:= singleType(pat.symbol.tpe.prefix, pat.symbol)) => (EmptyTree::ms, (j,dummies)::ss, rs); |
|||
what happened | The test(patternType =:= singleType(pat.symbol.tpe.prefix, pat.symbol)following causes a lot of Error's in rebind/singletonType these errors are masked by including the two tests in the comment above, but then you will get the indicated bu\ g in genLoad: |
|||
what expected | Fewer exceptions to be thrown. | |||
[back to overview] |
Burak edited on 2007-07-06 15:40:20.0 |
partially fixed -- a problem with the representation of patterns that match case object Foo vs object Foo |