File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/compiler/scala/tools/nsc/typechecker Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -488,10 +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 || (vd.mods.isLazy && isUnitType(vd.symbol.info)) || (owner.isTrait && ! traitFieldFor(vd))
491
+ def noFieldFor (vd : ValDef ) = vd.mods.isDeferred || (vd.mods.isLazy && ! owner.isTrait && isUnitType(vd.symbol.info)) || (owner.isTrait && ! traitFieldFor(vd))
492
492
493
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 )
494
+ private def traitFieldFor (vd : ValDef ): Boolean = vd.mods.hasFlag(PRESUPER | LAZY )
495
495
}
496
496
497
497
case class Field (tree : ValDef ) extends DerivedFromValDef {
You can’t perform that action at this time.
0 commit comments