[AA] Remove classifiers from non-static declared member scopes
- The semantics of a non-static declared member scope should be as follows: For a variable `c: C` of class type `C`, the declared member scope should contain all members `x` accessible as `c.x` (visibility notwithstanding) which are *also* explicitly declared in `C`. - Classifiers are not accessible as properties of a variable `c`, only as static members of the class `C` itself, so non-static declared member scopes should not contain any classifiers. ^KT-61800
This commit is contained in:
committed by
Space Team
parent
8b24baade9
commit
5679acbbdb
+1
-1
@@ -13,7 +13,7 @@ public abstract class JavaClass {
|
||||
|
||||
public static int y = 1;
|
||||
|
||||
public class C1 {
|
||||
public static class C1 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
@@ -12,6 +12,8 @@ public interface SuperInterface {
|
||||
|
||||
// FILE: SuperClass.java
|
||||
public abstract class SuperClass implements SuperInterface {
|
||||
public static class NestedSuperClass { }
|
||||
|
||||
@Override
|
||||
public int getActualRandomNumber() {
|
||||
return getRandomNumber();
|
||||
@@ -26,6 +28,8 @@ public abstract class SuperClass implements SuperInterface {
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass extends SuperClass {
|
||||
public static class NestedClass { }
|
||||
|
||||
public static int foo = 1;
|
||||
|
||||
public static String bar() {
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
open fun bar(): kotlin.String!
|
||||
|
||||
open var foo: kotlin.Int
|
||||
|
||||
open fun bar(): kotlin.String!
|
||||
open class NestedClass
|
||||
Vendored
+50
-21
@@ -1,24 +1,3 @@
|
||||
KtJavaFieldSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /JavaClass.foo
|
||||
contextReceivers: []
|
||||
isExtension: false
|
||||
isStatic: true
|
||||
isVal: false
|
||||
modality: OPEN
|
||||
name: foo
|
||||
origin: JAVA
|
||||
receiverParameter: null
|
||||
returnType: KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Int
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /JavaClass.bar
|
||||
@@ -48,4 +27,54 @@ KtFunctionSymbol:
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
|
||||
KtJavaFieldSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /JavaClass.foo
|
||||
contextReceivers: []
|
||||
isExtension: false
|
||||
isStatic: true
|
||||
isVal: false
|
||||
modality: OPEN
|
||||
name: foo
|
||||
origin: JAVA
|
||||
receiverParameter: null
|
||||
returnType: KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Int
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
deprecationStatus: null
|
||||
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: JavaClass.NestedClass
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
contextReceivers: []
|
||||
isActual: false
|
||||
isData: false
|
||||
isExpect: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: OPEN
|
||||
name: NestedClass
|
||||
origin: JAVA
|
||||
superTypes: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Any
|
||||
]
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
getContainingModule: KtSourceModule "Sources of main"
|
||||
annotationApplicableTargets: null
|
||||
deprecationStatus: null
|
||||
Reference in New Issue
Block a user