It should not be possible to write two extension methods with the same name.
The following code:
using java.lang;
using stab.lang;
package examples {
[StaticClass]
public class Strings {
[ExtensionMethod]
public static String capitalize(String s) {
return "Strings";
}
}
[StaticClass]
public class StringUtil {
[ExtensionMethod]
public static String capitalize(String s) {
return "StringUtil";
}
}
public class Main {
public static void main(String[] args) {
String s = "ssss";
System.out.println(s.capitalize());
}
}
}
returns "Strings", but it should terminate with a compiler error.
Original issue reported on code.google.com by ice.ta...@gmail.com on 19 Jun 2010 at 12:40
Original issue reported on code.google.com by
ice.ta...@gmail.com
on 19 Jun 2010 at 12:40