diff options
author | Martin Odersky <odersky@gmail.com> | 2014-11-09 13:21:06 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-11-10 13:31:00 +0100 |
commit | 540479ad682fae4278f15e9eb7d4a17f084e21b2 (patch) | |
tree | c7f331ff2764ebfdf5fe5d31f94c529eb504268f /src/dotty/tools/dotc/transform/ExplicitOuter.scala | |
parent | 18cd0dde7e949d6ae20f451f98843d48f28e2e26 (diff) | |
download | dotty-540479ad682fae4278f15e9eb7d4a17f084e21b2.tar.gz dotty-540479ad682fae4278f15e9eb7d4a17f084e21b2.tar.bz2 dotty-540479ad682fae4278f15e9eb7d4a17f084e21b2.zip |
Clean up code relating to interfaces.
Previous implementation was confused about the meaning of interface (with default methods
or without?).
Now instead of Interface/JavaInterface we have
PureInterface - all members are abstract methods
NoInits - all members are methods
Diffstat (limited to 'src/dotty/tools/dotc/transform/ExplicitOuter.scala')
-rw-r--r-- | src/dotty/tools/dotc/transform/ExplicitOuter.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/src/dotty/tools/dotc/transform/ExplicitOuter.scala index 28d742b5e..436d9bcf7 100644 --- a/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -144,11 +144,11 @@ object ExplicitOuter { nme.OUTER.expandedName(cls) /** Class needs an outer pointer, provided there is a reference to an outer this in it. */ - def needsOuterIfReferenced(cls: ClassSymbol)(implicit ctx: Context): Boolean = !( - cls.isStatic || - cls.owner.enclosingClass.isStaticOwner || - cls.is(Interface) - ) + def needsOuterIfReferenced(cls: ClassSymbol)(implicit ctx: Context): Boolean = + !(cls.isStatic || + cls.owner.enclosingClass.isStaticOwner || + cls.is(PureInterface) + ) /** Class unconditionally needs an outer pointer. This is the case if * the class needs an outer pointer if referenced and one of the following holds: |