File tree Expand file tree Collapse file tree 4 files changed +9
-3
lines changed Expand file tree Collapse file tree 4 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11// Java
2- public class B_1 extends A_1 {
2+ public class B_1 {
33 public int bar () {
44 return 2 ;
55 }
Original file line number Diff line number Diff line change 11import annotation .alpha
22class C extends B_1 { // error: Name clash between defined and inherited member
3- @ alpha(" bar" ) override def foo (): Int = 3
3+ @ alpha(" bar" ) def foo (): Int = 3
44}
Original file line number Diff line number Diff line change 1+ // Java
2+ public class B_1 {
3+ public int bar () {
4+ return 2 ;
5+ }
6+ }
Original file line number Diff line number Diff line change 11import annotation .alpha
22class D extends B_1 {
3- @ alpha(" bar" ) def foo (): Int = 3 // error: needs override
3+ @ alpha(" bar" ) def foo (): Int = 3
44}
55class E extends B_1 {
66 @ alpha(" baz" ) override def bar (): Int = 3 // error: cannot have an @alpha annotation since external names would be different
You can’t perform that action at this time.
0 commit comments