git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@5670 5e8d7ff9-d8ef-0310-90f0-a4852d11357a

This commit is contained in:
odersky 2006-01-31 13:02:54 +00:00
parent df441ce645
commit 30f7f58c4f
1 changed files with 1 additions and 1 deletions

View File

@ -553,7 +553,7 @@ mixin class Typers requires Analyzer {
else if (psym.isSealed && !phase.erasedTypes) {
// are we in same scope as base type definition?
val e = defscope.lookupEntry(psym.name)
if (!(e != null && e.sym == psym && e.owner == defscope)) {
if (c.owner.isPackageClass || !(e != null && e.sym == psym && e.owner == defscope)) {
// we are not within same statement sequence
var c = context
while (c != NoContext && c.owner != psym) c = c.outer.enclClass