Corrected implementation of DeclarationDescriptor.canBeReferencedViaImport() to include object members

This commit is contained in:
Valentin Kipyatkov
2015-10-18 10:57:46 +03:00
parent 4a0eb3836f
commit 1730069d5e
3 changed files with 5 additions and 3 deletions
@@ -47,7 +47,7 @@ public fun DeclarationDescriptor.canBeReferencedViaImport(): Boolean {
return when (this) {
is ConstructorDescriptor -> !parentClass.isInner() // inner class constructors can't be referenced via import
is ClassDescriptor -> true
else -> false
else -> parentClass.kind == ClassKind.OBJECT
}
}
@@ -1,6 +1,7 @@
// ERROR: Unresolved reference: f
package to
import a.A
fun g() {
f()
A.f()
}
@@ -0,0 +1 @@
a.A.Companion.f