File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,6 @@ class ExplicitOuter extends MiniPhaseTransform with InfoTransformer { thisTransf
117
117
object ExplicitOuter {
118
118
import ast .tpd ._
119
119
120
- private val LocalInstantiationSite = Module | Private
121
-
122
120
/** Ensure that class `cls` has outer accessors */
123
121
def ensureOuterAccessors (cls : ClassSymbol )(implicit ctx : Context ): Unit = {
124
122
// todo: implementing #165 would simplify this logic
@@ -176,7 +174,8 @@ object ExplicitOuter {
176
174
177
175
/** Class is always instantiated in the compilation unit where it is defined */
178
176
private def hasLocalInstantiation (cls : ClassSymbol )(implicit ctx : Context ): Boolean =
179
- cls.owner.isTerm || cls.is(LocalInstantiationSite )
177
+ // scala2x modules always take an outer pointer(as of 2.11)
178
+ cls.owner.isTerm || cls.is(Private ) || cls.is(Module , Scala2x )
180
179
181
180
/** The outer parameter accessor of cass `cls` */
182
181
private def outerParamAccessor (cls : ClassSymbol )(implicit ctx : Context ): TermSymbol =
You can’t perform that action at this time.
0 commit comments