File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings {
138
138
}
139
139
140
140
/** -Y "Private" settings */
141
- val YoverrideVars : Setting [Boolean ] = BooleanSetting (" -Yoverride-vars" , " Allow vars to be overridden." )
142
141
val Yhelp : Setting [Boolean ] = BooleanSetting (" -Y" , " Print a synopsis of private options." )
143
142
val Ycheck : Setting [List [String ]] = PhasesSetting (" -Ycheck" , " Check the tree at the end of" )
144
143
val YcheckMods : Setting [Boolean ] = BooleanSetting (" -Ycheck-mods" , " Check that symbols and their defining trees have modifiers in sync." )
Original file line number Diff line number Diff line change @@ -413,12 +413,8 @@ object RefChecks {
413
413
else if (other.is(AbsOverride ) && other.isIncompleteIn(clazz) && ! member.is(AbsOverride ))
414
414
overrideError(" needs `abstract override` modifiers" )
415
415
else if (member.is(Override ) && other.is(Accessor ) &&
416
- other.accessedFieldOrGetter.is(Mutable , butNot = Lazy )) {
417
- // !?! this is not covered by the spec. We need to resolve this either by changing the spec or removing the test here.
418
- // !!! is there a !?! convention? I'm !!!ing this to make sure it turns up on my searches.
419
- if (! ctx.settings.YoverrideVars .value)
420
- overrideError(" cannot override a mutable variable" )
421
- }
416
+ other.accessedFieldOrGetter.is(Mutable , butNot = Lazy ))
417
+ overrideError(" cannot override a mutable variable" )
422
418
else if (member.isAnyOverride &&
423
419
! (member.owner.thisType.baseClasses exists (_ isSubClass other.owner)) &&
424
420
! member.is(Deferred ) && ! other.is(Deferred ) &&
You can’t perform that action at this time.
0 commit comments