Working on overloads. The corresponding test fails. That's allright: the work is not finished yet.

This commit is contained in:
Andrey Breslav
2011-02-16 16:57:12 +03:00
parent 3184d972bf
commit 986e703fad
29 changed files with 660 additions and 157 deletions
@@ -317,6 +317,12 @@ public class JetTypeCheckerTest extends LightDaemonAnalyzerTestCase {
assertType("new Props<Properties>().p.p", "Int");
}
public void testOverloads() throws Exception {
assertType("new Functions<String>().f()", "Unit");
assertType("new Functions<String>().f(1)", "Int");
assertType("new Functions<String>().f(1d)", "Any");
}
// public void testImplicitConversions() throws Exception {
// assertConvertibleTo("1", JetStandardClasses.getByteType());
// }
@@ -421,6 +427,11 @@ public class JetTypeCheckerTest extends LightDaemonAnalyzerTestCase {
"open class Derived_outT<out T> : Base_outT<T>",
"class Properties { val p : Int }",
"class Props<T> { val p : T }",
"class Functions<T> { " +
"fun f() : Unit {} " +
"fun f(a : Int) : Int {} " +
"fun f(a : T) : Any {} " +
"}"
};
public static JetScope BASIC_SCOPE = new JetScopeAdapter(JetStandardClasses.STANDARD_CLASSES) {