When a classfile contains two methods that are the same except for the return type (this is not possible if such file is compiled from source, but could happen in machine generated code), javac does not issue ambiguity errors when an attempt to call the method is made. Instead, javac non-deterministically resolves to one of the two methods.
no ambuguity error is emitted if classfile contains two identical methods with different return types
-
Maurizio Cimadamore
-
Maurizio Cimadamore
- Votes:
-
0 Vote for this issue
- Watchers:
-
2 Start watching this issue
- Created:
- Updated:
- Resolved: