Created
June 9, 2011 09:44
-
-
Save nahi/1016436 to your computer and use it in GitHub Desktop.
JDK 1.7.0-ea compile failure from b143
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Foo { | |
public static void main(String[] args) { | |
method("str"); | |
method("str", 1); | |
method("str", 1, "data"); | |
} | |
public static void method(String str, int num, Object... data) { | |
// do nothing | |
} | |
public static void method(String str, Object... data) { | |
// do nothing | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% /home/nahi/java/jdk1.6.0_25/bin/javac Foo.java | |
% OK | |
% /home/nahi/java/jdk1.7.0b146/bin/javac Foo.java | |
Foo.java:4: error: reference to method is ambiguous, both method method(String,int,Object...) in Foo and method method(String,Object...) in Foo match | |
method("str", 1); | |
^ | |
Foo.java:5: error: reference to method is ambiguous, both method method(String,int,Object...) in Foo and method method(String,Object...) in Foo match | |
method("str", 1, "data"); | |
^ | |
2 errors | |
% /home/nahi/java/jdk1.7.0b145/bin/javac Foo.java | |
Foo.java:4: error: reference to method is ambiguous, both method method(String,int,Object...) in Foo and method method(String,Object...) in Foo match | |
method("str", 1); | |
^ | |
Foo.java:5: error: reference to method is ambiguous, both method method(String,int,Object...) in Foo and method method(String,Object...) in Foo match | |
method("str", 1, "data"); | |
^ | |
2 errors | |
% /home/nahi/java/jdk1.7.0b144/bin/javac Foo.java | |
Foo.java:4: error: reference to method is ambiguous, both method method(String,int,Object...) in Foo and method method(String,Object...) in Foo match | |
method("str", 1); | |
^ | |
Foo.java:5: error: reference to method is ambiguous, both method method(String,int,Object...) in Foo and method method(String,Object...) in Foo match | |
method("str", 1, "data"); | |
^ | |
2 errors | |
% /home/nahi/java/jdk1.7.0b143/bin/javac Foo.java | |
Foo.java:4: error: reference to method is ambiguous, both method method(String,int,Object...) in Foo and method method(String,Object...) in Foo match | |
method("str", 1); | |
^ | |
Foo.java:5: error: reference to method is ambiguous, both method method(String,int,Object...) in Foo and method method(String,Object...) in Foo match | |
method("str", 1, "data"); | |
^ | |
2 errors | |
% /home/nahi/java/jdk1.7.0b142/bin/javac Foo.java | |
% OK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment