No members from anonymous objects etc

This commit is contained in:
Valentin Kipyatkov
2015-11-06 12:44:14 +03:00
parent 97ca5f0389
commit 4da6a3cd50
4 changed files with 59 additions and 7 deletions
@@ -2,13 +2,13 @@ package test
object KotlinObject {
fun funFromObject() { }
private fun privateFun(){}
private fun funPrivate(){}
}
class KotlinClass {
companion object SomeName {
fun funFromCompanionObject() { }
private fun privateFun(){}
private fun funPrivate(){}
}
}
@@ -16,4 +16,28 @@ class AnotherKotlinClass {
private companion object {
fun funFromPrivateCompanionObject() { }
}
object Nested {
fun fromNested(){}
}
}
interface I {
fun fromInterface()
}
object DefaultI : I {
override fun fromInterface() {
}
}
fun foo() {
val o = object : Runnable {
override fun run() {
fromAnonymous()
}
fun fromAnonymous(){}
}
}