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

38 lines
2.4 KiB
Plaintext
Vendored

PsiJetFileStubImpl[package=test]
PACKAGE_DIRECTIVE
REFERENCE_EXPRESSION[referencedName=test]
IMPORT_LIST
CLASS[classId=test/FunInterfaceDeclaration, fqName=test.FunInterfaceDeclaration, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=FunInterfaceDeclaration, superNames=[]]
MODIFIER_LIST[public final]
PRIMARY_CONSTRUCTOR[fqName=null, hasBody=false, isDelegatedCallToThis=false, isExplicitDelegationCall=false, isExtension=false, isTopLevel=false, name=FunInterfaceDeclaration]
MODIFIER_LIST[public]
VALUE_PARAMETER_LIST
CLASS_BODY
CLASS[classId=test/FunInterfaceDeclaration.KRunnable, fqName=test.FunInterfaceDeclaration.KRunnable, isEnumEntry=false, isInterface=true, isLocal=false, isTopLevel=false, name=KRunnable, superNames=[]]
MODIFIER_LIST[public fun]
CLASS_BODY
FUN[fqName=test.FunInterfaceDeclaration.KRunnable.invoke, hasBlockBody=true, hasBody=false, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, mayHaveContract=false, name=invoke]
MODIFIER_LIST[abstract public]
VALUE_PARAMETER_LIST
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=Unit]
CLASS[classId=test/FunInterfaceDeclaration.GenericKRunnable, fqName=test.FunInterfaceDeclaration.GenericKRunnable, isEnumEntry=false, isInterface=true, isLocal=false, isTopLevel=false, name=GenericKRunnable, superNames=[]]
MODIFIER_LIST[public fun]
TYPE_PARAMETER_LIST
TYPE_PARAMETER[fqName=null, isInVariance=false, isOutVariance=false, name=T]
TYPE_PARAMETER[fqName=null, isInVariance=false, isOutVariance=false, name=R]
CLASS_BODY
FUN[fqName=test.FunInterfaceDeclaration.GenericKRunnable.invoke, hasBlockBody=true, hasBody=false, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, mayHaveContract=false, name=invoke]
MODIFIER_LIST[abstract public]
VALUE_PARAMETER_LIST
VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=t]
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=T]
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=R]