File tree 1 file changed +6
-4
lines changed
src/compiler/scala/tools/nsc/typechecker 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -486,10 +486,12 @@ trait MethodSynthesis {
486
486
// as the symbol info is in the process of being created then.
487
487
// TODO: harmonize tree & symbol creation
488
488
// TODO: the `def field` call-site breaks when you add `|| vd.symbol.owner.isTrait` (detected in test suite)
489
- def noFieldFor (vd : ValDef ) = (
490
- vd.mods.isDeferred
491
- || (vd.mods.isLazy && isUnitType(vd.symbol.info))
492
- || (owner.isTrait && ! vd.mods.hasFlag(PRESUPER )))
489
+ def noFieldFor (vd : ValDef ) = vd.mods.isDeferred || (owner.isTrait && ! traitFieldFor(vd))
490
+
491
+ // TODO: remove need for this as we moved over all kinds of field to the getter-based encoding
492
+ private def traitFieldFor (vd : ValDef ): Boolean =
493
+ (vd.mods.isLazy && ! isUnitType(vd.symbol.info)) || vd.mods.hasFlag(PRESUPER )
494
+
493
495
}
494
496
495
497
case class Field (tree : ValDef ) extends DerivedFromValDef {
You can’t perform that action at this time.
0 commit comments