File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -281,9 +281,10 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
281281 else {
282282 if (ms.nonEmpty)
283283 for (m <- ms)
284- assert(flags.isAllOf(m.flags) ||
285- m.isInstanceOf [Mod .Private ] && ! privateWithin.isEmpty,
286- s " unaccounted modifier: $m in $this when adding $ms" )
284+ assert(flags.isAllOf(m.flags)
285+ || m.isInstanceOf [Mod .Private ] && ! privateWithin.isEmpty
286+ || (m.isInstanceOf [Mod .Abstract ] || m.isInstanceOf [Mod .Override ]) && flags.is(AbsOverride ),
287+ s " unaccounted modifier: $m in $this with flags ${flags.flagsString} when adding $ms" )
287288 copy(mods = ms)
288289 }
289290
Original file line number Diff line number Diff line change 1+ class Foo {
2+ abstract override var // error
3+ }
You can’t perform that action at this time.
0 commit comments