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 @@ -137,7 +137,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings {
137137 }
138138
139139 /** -Y "Private" settings */
140- val YoverrideVars : Setting [Boolean ] = BooleanSetting (" -Yoverride-vars" , " Allow vars to be overridden." )
141140 val Yhelp : Setting [Boolean ] = BooleanSetting (" -Y" , " Print a synopsis of private options." )
142141 val Ycheck : Setting [List [String ]] = PhasesSetting (" -Ycheck" , " Check the tree at the end of" )
143142 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 {
413413 else if (other.is(AbsOverride ) && other.isIncompleteIn(clazz) && ! member.is(AbsOverride ))
414414 overrideError(" needs `abstract override` modifiers" )
415415 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" )
422418 else if (member.isAnyOverride &&
423419 ! (member.owner.thisType.baseClasses exists (_ isSubClass other.owner)) &&
424420 ! member.is(Deferred ) && ! other.is(Deferred ) &&
You can’t perform that action at this time.
0 commit comments