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 1
1
// Java
2
- public class B_1 extends A_1 {
2
+ public class B_1 {
3
3
public int bar () {
4
4
return 2 ;
5
5
}
Original file line number Diff line number Diff line change 1
1
import annotation .alpha
2
2
class 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
4
4
}
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 1
1
import annotation .alpha
2
2
class D extends B_1 {
3
- @ alpha(" bar" ) def foo (): Int = 3 // error: needs override
3
+ @ alpha(" bar" ) def foo (): Int = 3
4
4
}
5
5
class E extends B_1 {
6
6
@ 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