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