File tree 3 files changed +5
-7
lines changed 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ object PickleBuffer {
221
221
FINAL_PKL -> Final ,
222
222
METHOD_PKL -> Method ,
223
223
INTERFACE_PKL -> NoInitsInterface ,
224
- MODULE_PKL -> Module ,
224
+ MODULE_PKL -> ( Module | Lazy , Module ) ,
225
225
IMPLICIT_PKL -> Implicit ,
226
226
SEALED_PKL -> Sealed ,
227
227
CASE_PKL -> Case ,
@@ -287,16 +287,13 @@ object PickleBuffer {
287
287
val shift = ChunkBits
288
288
val mask = ChunkSize - 1
289
289
assert(6 * ChunkBits == ScalaFlagEnd )
290
- val t = FlagSet (
290
+ FlagSet (
291
291
map(0 )((sflags >>> (shift * 0 )).toInt & mask) |
292
292
map(1 )((sflags >>> (shift * 1 )).toInt & mask) |
293
293
map(2 )((sflags >>> (shift * 2 )).toInt & mask) |
294
294
map(3 )((sflags >>> (shift * 3 )).toInt & mask) |
295
295
map(4 )((sflags >>> (shift * 4 )).toInt & mask) |
296
296
map(5 )((sflags >>> (shift * 5 )).toInt & mask)
297
297
)
298
- if (! isType && t.is(Module , Lazy ))
299
- t | Lazy // scala2 modules do not always set lazy flag. Dotty modules do
300
- else t
301
298
}
302
299
}
Original file line number Diff line number Diff line change @@ -175,7 +175,8 @@ object ExplicitOuter {
175
175
/** Class is always instantiated in the compilation unit where it is defined */
176
176
private def hasLocalInstantiation (cls : ClassSymbol )(implicit ctx : Context ): Boolean =
177
177
// scala2x modules always take an outer pointer(as of 2.11)
178
- cls.owner.isTerm || cls.is(Private ) || cls.is(Module , Scala2x )
178
+ // dotty modules are always locally instantiated
179
+ cls.owner.isTerm || cls.is(Private ) || cls.is(Module , butNot = Scala2x )
179
180
180
181
/** The outer parameter accessor of cass `cls` */
181
182
private def outerParamAccessor (cls : ClassSymbol )(implicit ctx : Context ): TermSymbol =
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ class Mixin extends MiniPhaseTransform with SymTransformer { thisTransform =>
216
216
val rhs =
217
217
if (ctx.atPhase(thisTransform)(implicit ctx => getter.is(ParamAccessor ))) nextArgument()
218
218
else if (isScala2x)
219
- if (getter.is(Lazy , Module )) lazyGetterCall
219
+ if (getter.is(Lazy , butNot = Module )) lazyGetterCall
220
220
else if (getter.is(Module ))
221
221
New (getter.info.resultType, List (This (cls)))
222
222
else Underscore (getter.info.resultType)
You can’t perform that action at this time.
0 commit comments