Files
Nikolay Lunyak 9688865953 [FIR] Check the presence of delegated constructor call via stubs
After `4b8b7aaa` external classes' secondary
constructors should not have a delegated call, so we
don't create a call if there's no explicit call.
But we need to check if there is.

The failing tests were muted in
`8fcf91d8`, and are now unmuted
back. Those are the ones in the
`testData/rawBuilder/declarations`
folder. These tests fail because they supply
PSI stubs for the secondary constructors,
so arbitrary operations (like reading .text of
the delegated constructor call) are not allowed
for them. This commit modifies secondary
constructor stubs to include the
required information.

^KT-65268 Fixed


Merge-request: KT-MR-13982
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2024-02-02 08:15:54 +00:00

87 lines
4.0 KiB
Plaintext
Vendored

PsiJetFileStubImpl[package=]
PACKAGE_DIRECTIVE
IMPORT_LIST
CLASS[classId=/ContextReceiversCallableMembers, fqName=ContextReceiversCallableMembers, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=ContextReceiversCallableMembers, superNames=[]]
MODIFIER_LIST[open private]
PRIMARY_CONSTRUCTOR[fqName=null, hasBody=false, isDelegatedCallToThis=false, isExplicitDelegationCall=false, isExtension=false, isTopLevel=false, name=ContextReceiversCallableMembers]
MODIFIER_LIST[public]
VALUE_PARAMETER_LIST
CLASS_BODY
PROPERTY[fqName=ContextReceiversCallableMembers.property, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=true, isTopLevel=false, isVar=false, name=property]
CONTEXT_RECEIVER_LIST
CONTEXT_RECEIVER[label=null]
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=A]
CONTEXT_RECEIVER[label=null]
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=B]
MODIFIER_LIST[private final]
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=Int]
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=Int]
PROPERTY_ACCESSOR[hasBlockBody=true, hasBody=false, isGetter=true]
MODIFIER_LIST[private final]
PROPERTY[fqName=ContextReceiversCallableMembers.propertyWithSetter, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=true, isTopLevel=false, isVar=true, name=propertyWithSetter]
CONTEXT_RECEIVER_LIST
CONTEXT_RECEIVER[label=null]
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=A]
CONTEXT_RECEIVER[label=null]
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=B]
MODIFIER_LIST[private final]
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=Int]
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=Int]
PROPERTY_ACCESSOR[hasBlockBody=true, hasBody=false, isGetter=true]
MODIFIER_LIST[private final]
PROPERTY_ACCESSOR[hasBlockBody=true, hasBody=true, isGetter=false]
MODIFIER_LIST[private final]
VALUE_PARAMETER_LIST
VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=v]
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=Int]
FUN[fqName=ContextReceiversCallableMembers.function, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=true, isTopLevel=false, mayHaveContract=false, name=function]
CONTEXT_RECEIVER_LIST
CONTEXT_RECEIVER[label=null]
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=A]
CONTEXT_RECEIVER[label=null]
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=B]
MODIFIER_LIST[private final]
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=Int]
VALUE_PARAMETER_LIST
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=Int]