diff options
author | Martin Odersky <odersky@gmail.com> | 2007-07-12 14:56:50 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-07-12 14:56:50 +0000 |
commit | 080802c84dd71fe6b6912025d4338e8b122a6a9a (patch) | |
tree | ca64772a9fdf2912d2cfcadae2bacebc37e29202 /src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala | |
parent | a874f351097b67eef720bb64faffc603070526ed (diff) | |
download | scala-080802c84dd71fe6b6912025d4338e8b122a6a9a.tar.gz scala-080802c84dd71fe6b6912025d4338e8b122a6a9a.tar.bz2 scala-080802c84dd71fe6b6912025d4338e8b122a6a9a.zip |
1.
2. some new tests.
3. split Type.symbol to typeSymbol/termSymbol
4. some fixes to lub opertation
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala index aba9a20229..dd20917dd0 100644 --- a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala +++ b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala @@ -40,9 +40,9 @@ abstract class ExplicitOuter extends InfoTransform with TransMatcher with Patter /** Does given <code>clazz</code> define an outer field? */ def hasOuterField(clazz: Symbol) = { def hasSameOuter(parent: Type) = - parent.symbol.isClass && + parent.typeSymbol.isClass && clazz.owner.isClass && - clazz.owner == parent.symbol.owner && + clazz.owner == parent.typeSymbol.owner && parent.prefix =:= clazz.owner.thisType isInner(clazz) && !clazz.isTrait && (clazz.info.parents.isEmpty || !hasSameOuter(clazz.info.parents.head)) @@ -167,7 +167,7 @@ abstract class ExplicitOuter extends InfoTransform with TransMatcher with Patter * The result is typed but not positioned. */ private def outerSelect(base: Tree): Tree = - localTyper.typed(Apply(Select(base, outerAccessor(base.tpe.symbol)), List())) + localTyper.typed(Apply(Select(base, outerAccessor(base.tpe.typeSymbol)), List())) /** The path * <blockquote><pre>`base'.$outer$$C1 ... .$outer$$Cn</pre></blockquote> @@ -367,7 +367,7 @@ abstract class ExplicitOuter extends InfoTransform with TransMatcher with Patter case Select(qual, name) => if (currentClass != sym.owner/* && currentClass != sym.moduleClass*/) // (3) sym.makeNotPrivate(sym.owner) - val qsym = qual.tpe.widen.symbol + val qsym = qual.tpe.widen.typeSymbol if ((sym hasFlag PROTECTED) && //(4) (qsym.isTrait || !(qual.isInstanceOf[Super] || (qsym isSubClass currentClass)))) sym setFlag notPROTECTED @@ -413,7 +413,7 @@ abstract class ExplicitOuter extends InfoTransform with TransMatcher with Patter var checkExhaustive = true def isUnsealedAnnotation(tpe: Type) = tpe match { - case AnnotatedType(List(AnnotationInfo(atp, _, _)), _) if atp.symbol == UncheckedClass => + case AnnotatedType(List(AnnotationInfo(atp, _, _)), _) if atp.typeSymbol == UncheckedClass => true case _ => false |