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 {
281
281
else {
282
282
if (ms.nonEmpty)
283
283
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" )
287
288
copy(mods = ms)
288
289
}
289
290
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