having the following classes hierarchy:
RR <- HH
S <- HS <- AS <- AAS
and following methods:
S.service(RR) { }
HS.service(RR) { this.service(HH) }
HS.service(HH) { }
AS.service(RR) { super.service(RR) }
AAS.service(HH) { super.service(HH) }
gives a "Reference to service is ambiguous. It is defined in void service(RR) and void service(HH)." compile error.
it shouldn't.
using the fastjavac compiler from javaworkshop 3.0 compiles fine.
after compiled, can be run by any VM.
RR <- HH
S <- HS <- AS <- AAS
and following methods:
S.service(RR) { }
HS.service(RR) { this.service(HH) }
HS.service(HH) { }
AS.service(RR) { super.service(RR) }
AAS.service(HH) { super.service(HH) }
gives a "Reference to service is ambiguous. It is defined in void service(RR) and void service(HH)." compile error.
it shouldn't.
using the fastjavac compiler from javaworkshop 3.0 compiles fine.
after compiled, can be run by any VM.
- relates to
-
JDK-4067106 Overloading ambiguity detection is inconsistent
- Closed