FIR: Explicitlty separate static and member scopes
For Java, they have rather different semantics considering "overrides" and obtaining functions/properties from supertypes See the Java statics implementation
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ fun main() {
|
||||
|
||||
C.a
|
||||
C.b
|
||||
C.foo()
|
||||
C.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
C.bar()
|
||||
|
||||
K.<!UNRESOLVED_REFERENCE!>a<!>
|
||||
|
||||
+2
-2
@@ -26,5 +26,5 @@ public class StaticOverrides {
|
||||
fun test() {
|
||||
StaticOverrides.A.<!AMBIGUITY!>foo<!> {} <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Boolean>() }
|
||||
StaticOverrides.B.foo {} checkType { _<String>() }
|
||||
StaticOverrides.C.foo {} checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Boolean>() }
|
||||
}
|
||||
StaticOverrides.C.<!AMBIGUITY!>foo<!> {} <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Boolean>() }
|
||||
}
|
||||
|
||||
@@ -5,12 +5,6 @@ FILE fqName:<root> fileName:/fakeOverridesForJavaStaticMembers.kt
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in a.Base'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[a.Base]'
|
||||
FUN FAKE_OVERRIDE name:publicStaticMethod visibility:public modality:OPEN <> () returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
public open fun publicStaticMethod (): kotlin.Unit declared in a.Base
|
||||
FUN FAKE_OVERRIDE name:protectedStaticMethod visibility:protected/*protected static*/ modality:OPEN <> () returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
protected/*protected static*/ open fun protectedStaticMethod (): kotlin.Unit declared in a.Base
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
|
||||
Reference in New Issue
Block a user