File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -407,6 +407,7 @@ object Checking {
407407 checkCombination(Final , Sealed )
408408 checkCombination(Private , Protected )
409409 checkCombination(Abstract , Override )
410+ checkCombination(Private , Override )
410411 checkCombination(Lazy , Transparent )
411412 checkCombination(Rewrite , Transparent )
412413 checkNoConflict(Lazy , ParamAccessor , s " parameter may not be `lazy` " )
Original file line number Diff line number Diff line change 1+ class Foo {
2+ protected [this ] def foo = 1
3+ protected def foo2 = 1
4+ val foo3 = 1
5+
6+ }
7+
8+ class Bar extends Foo {
9+ // illegal combination of modifiers: `private` and `override`
10+ override private [this ] def foo = 2 // error
11+ override private [this ] def foo2 = 2 // error
12+ override private val foo3 = 2 // error
13+ }
You can’t perform that action at this time.
0 commit comments