Supported renaming of default object. Named only objects are supported

yet.
This commit is contained in:
Evgeny Gerashchenko
2015-03-12 21:25:28 +03:00
parent 3a8ded5b58
commit ccd1701f78
11 changed files with 102 additions and 3 deletions
@@ -0,0 +1,8 @@
class JavaUsage {
public static void main(String[] args) {
System.out.println(Foo.CONST);
Foo.s();
Foo.Bar.f();
Foo foo = new Foo(); // not usage of default object
}
}
@@ -0,0 +1,11 @@
class Foo {
default object Bar {
fun f() {
}
platformStatic fun s() {
}
val CONST = 42
}
}
@@ -0,0 +1,8 @@
fun main(args: Array<String>) {
// class object usages
Foo.f()
val x = Foo
Foo.Bar.f()
val xx = Foo.Bar
}