From da71a152cdafbb432c612d78676a81c0b82d7b29 Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Fri, 28 Jul 2023 18:01:55 +0200 Subject: [PATCH] [FIR] update FirRenderer for scripts ^KT-60728 --- ...classMemberPropertyScript.lazy.resolve.txt | 44 +- .../classScript.lazy.resolve.txt | 28 +- .../constructorsScript.lazy.resolve.txt | 28 +- ...nnotationClassLevelScript.lazy.resolve.txt | 56 +- ...tionsInPropertyInitScript.lazy.resolve.txt | 43 +- .../enumClassScript.lazy.resolve.txt | 58 +- .../enumClassWithBodyScript.lazy.resolve.txt | 62 +- .../initBlockScript.lazy.resolve.txt | 26 +- .../localClassScript.lazy.resolve.txt | 41 +- .../localFunScript.lazy.resolve.txt | 31 +- .../localPropertyScript.lazy.resolve.txt | 50 +- .../memberTypeAliasScript.lazy.resolve.txt | 18 +- .../nestedClassesScript.lazy.resolve.txt | 44 +- .../propertyAccessorsScript.lazy.resolve.txt | 41 +- .../fileStructure/script.lazy.resolve.txt | 70 +- .../superClassCallScript.lazy.resolve.txt | 104 +- ...sionBodyFunWithTypeScript.lazy.resolve.txt | 12 +- ...nBodyFunWithoutTypeScript.lazy.resolve.txt | 12 +- ...topLevelFunWithTypeScript.lazy.resolve.txt | 14 +- .../topLevelPropertyScript.lazy.resolve.txt | 32 +- .../topLevelUnitFunScript.lazy.resolve.txt | 12 +- .../withoutNameScript.lazy.resolve.txt | 62 +- ...notationApplicationArgumentOnStatement.txt | 27 +- .../annotationApplicationArgumentScript.txt | 24 +- ...otationApplicationCallExpressionScript.txt | 9 +- .../annotationOnReturnTypeScript.txt | 11 +- .../annotations/fileAnnotationScript.txt | 4 +- .../annotations/retentionValueScript.txt | 15 +- .../annotations/statementAnnotation.txt | 14 +- .../annotations/superCallAnnotationScript.txt | 33 +- ...OnConstructorParameterExpressionScript.txt | 28 +- ...eOnAnnotationOnFunctionParameterScript.txt | 27 +- ...OnFunctionParameterWithArgumentsScript.txt | 31 +- ...peOnAnnotationOnReceiverFunctionScript.txt | 24 +- ...eOnAnnotationOnReceiverParameterScript.txt | 24 +- ...AnnotationOnReceiverPropertyCallScript.txt | 28 +- ...peOnAnnotationOnReceiverPropertyScript.txt | 28 +- ...typeOnAnnotationOnReturnFunctionScript.txt | 24 +- ...typeOnAnnotationOnReturnPropertyScript.txt | 24 +- .../annotations/useSite/delegateScript.txt | 40 +- .../annotations/useSite/fieldScript.txt | 30 +- .../annotations/useSite/fileScript.txt | 15 +- .../annotations/useSite/getterScript.txt | 30 +- .../annotations/useSite/paramScript.txt | 30 +- .../annotations/useSite/propertyScript.txt | 30 +- .../annotations/useSite/setParamScript.txt | 30 +- .../annotations/useSite/setterScript.txt | 30 +- .../calls/callArgumentScript.txt | 16 +- ...eSuperCallAndExplicitConstructorScript.txt | 33 +- .../calls/calllTypeArgumentsScript.txt | 16 +- .../calls/compoundAssignOnVarScript.txt | 24 +- ...dAssignWithArrayAccessConventionScript.txt | 28 +- ...oundAssignWithArrayGetConventionScript.txt | 27 +- .../constructorDelegationSuperCallScript.txt | 24 +- .../calls/functionCallArgumentListScript.txt | 16 +- .../calls/invokeCallArgumentListScript.txt | 11 +- .../qualifiedCallInsideSuperCallScript.txt | 51 +- .../getOrBuildFir/calls/setOperatorScript.txt | 57 +- .../getOrBuildFir/calls/superTypeScript.txt | 18 +- .../constructorParameterScript.txt | 15 +- .../constructorPropertyScript.txt | 19 +- .../destructionWithNoRValueScript.txt | 10 +- .../declarations/destructuringEntryScript.txt | 15 +- .../declarations/destructuringScript.txt | 29 +- .../objectLiteralExpressionScript.txt | 19 +- .../declarations/objectLiteralScript.txt | 19 +- .../declarations/propertyDelegateScript.txt | 17 +- .../declarations/whereClause1Script.txt | 9 +- .../declarations/whereClause2Script.txt | 9 +- .../arrayAccessExpressionScript.txt | 11 +- .../arrayIndexExpressionWithIncScript.txt | 23 +- .../getOrBuildFir/expressions/assignment.txt | 67 +- .../binaryExpressionOperatorScript.txt | 9 +- .../expressions/binaryExpressionScript.txt | 9 +- .../expressions/blockExpressionScript.txt | 9 +- .../expressions/boolLiteralScript.txt | 9 +- .../expressions/callInsideFunction.txt | 67 +- .../expressions/callInsideStatement.txt | 67 +- .../expressions/forExpressionRangeScript.txt | 23 +- .../expressions/forExpressionScript.txt | 23 +- .../forExpressionVariableScript.txt | 23 +- .../expressions/ifExpressionScript.txt | 25 +- .../expressions/incExpressionScript.txt | 23 +- .../insidePlusAssignTargetScript.txt | 17 +- .../expressions/intLiteralScript.txt | 9 +- .../expressions/isExpressionScript.txt | 11 +- .../objectLiteralExpressionScript.txt | 17 +- .../parenthesizedExpressionScript.txt | 9 +- .../expressions/stringLiteralScript.txt | 9 +- .../stringTemplateExpressionEntryScript.txt | 9 +- .../expressions/throwExpressionScript.txt | 11 +- .../expressions/tryExpressionScript.txt | 23 +- .../expressions/whenExpressionScript.txt | 25 +- .../expressions/whileExpressionScript.txt | 13 +- .../expressions/wholeStringTemplateScript.txt | 9 +- .../inImport/firstImportNamePartScript.txt | 4 +- .../inImport/importListScript.txt | 4 +- .../inImport/middleImportNamePartScript.txt | 4 +- .../qualifiedImportNamePartScript.txt | 4 +- .../inImport/wholeImportDirectiveScript.txt | 4 +- .../inImport/wholeImportNameScript.txt | 4 +- .../inPackage/firstPackageNamePartScript.txt | 4 +- .../inPackage/middlePackageNamePartScript.txt | 4 +- .../qualifiedPackageNamePartScript.txt | 4 +- .../inPackage/wholePackageDirectiveScript.txt | 4 +- .../inPackage/wholePackageNameScript.txt | 4 +- ...OfQualifiedCallWithNestedClassesScript.txt | 34 +- ...iedPartOfQualifiedCallUnresolvedScript.txt | 29 +- .../types/functionalTypeScript.txt | 15 +- .../types/nestedClassTypeScript.txt | 34 +- .../types/nullableTypeScript.txt | 11 +- .../types/receiverTypeScript.txt | 18 +- .../getOrBuildFir/types/wholeTypeScript.txt | 11 +- .../wholeDeclaration/assignmentStatement.txt | 81 +- .../getOrBuildFir/wholeDeclaration/class.txt | 81 +- .../classTypeParemeterScript.txt | 15 +- .../wholeDeclaration/enumEntryScript.txt | 29 +- .../wholeDeclaration/function.txt | 81 +- .../wholeDeclaration/getterScript.txt | 13 +- .../wholeDeclaration/localClassScript.txt | 23 +- .../wholeDeclaration/localFunctionScript.txt | 15 +- .../wholeDeclaration/localPropertyScript.txt | 11 +- .../wholeDeclaration/memberFunctionScript.txt | 21 +- .../wholeDeclaration/memberPropertyScript.txt | 19 +- .../memberTypeAliasScript.txt | 17 +- .../wholeDeclaration/nestedClassScript.txt | 23 +- ...primaryConstructorValueParameterScript.txt | 15 +- .../wholeDeclaration/scriptInitializer.txt | 114 +- ...condaryConstructorValueParameterScript.txt | 21 +- .../wholeDeclaration/setterScript.txt | 13 +- .../wholeDeclaration/statement.txt | 114 +- .../topLevelPropertyScript.txt | 9 +- .../topLevelTypelTypeAliasScript.txt | 7 +- .../annotationArgumentsMixScript.txt | 1093 ++++--- .../annotationClassWithJavaTargetScript.txt | 209 +- .../annotationOnLocalClassScript.txt | 629 ++-- .../annotationParametersScript.txt | 967 +++--- .../lazyResolve/annotationsScript.txt | 153 +- ...sFunctionWithAnnotatedParameter2Script.txt | 601 ++-- ...atedParameterOnImplicitTypePhaseScript.txt | 601 ++-- ...usFunctionWithAnnotatedParameterScript.txt | 601 ++-- .../lazyResolve/classMembersScript.txt | 547 ++-- .../classes/annotationWithTargetScript.txt | 449 +-- .../classes/classWithTypeParametersScript.txt | 209 +- .../classes/functionInValueClassScript.txt | 351 +- ...archyWithOverrideAndNestedClass2Script.txt | 1681 +++++----- ...archyWithOverrideAndNestedClass3Script.txt | 1681 +++++----- ...archyWithOverrideAndNestedClass4Script.txt | 1681 +++++----- ...rarchyWithOverrideAndNestedClassScript.txt | 1681 +++++----- .../classes/hierarchyWithOverrideScript.txt | 657 ++-- .../lazyResolve/classes/nestedClassScript.txt | 657 ++-- ...stedClassWithPropertiesOverridesScript.txt | 505 +-- ...erRequiredAnnotationOnLocalClassScript.txt | 407 ++- ...AnnotationsOnConstructorPropertyScript.txt | 449 +-- ...RequiredAnnotationsOnConstructorScript.txt | 449 +-- ...lerRequiredAnnotationsOnFunctionScript.txt | 335 +- ...redAnnotationsOnPropertyDelegateScript.txt | 475 +-- ...lerRequiredAnnotationsOnPropertyScript.txt | 475 +-- .../complexLocalHierarchyScript.txt | 503 +-- .../complexRedeclarationScript.txt | 2871 +++++++++-------- .../lazyResolve/dataClassCopyScript.txt | 519 +-- .../lazyResolve/dataComponent2Script.txt | 519 +-- .../lazyResolve/delegatedFieldScript.txt | 489 +-- .../lazyResolve/enumEntriesScript.txt | 463 +-- .../testdata/lazyResolve/enumEntryScript.txt | 673 ++-- .../lazyResolve/enumValueOfScript.txt | 463 +-- .../testdata/lazyResolve/enumValuesScript.txt | 463 +-- .../fakePrimaryConstructorScript.txt | 267 +- .../lazyResolve/fileAnnotationsScript.txt | 267 +- .../fromLocalHierarchyToOuterScript.txt | 965 +++--- .../functionWithParameterScript.txt | 251 +- .../lazyResolve/functions/contractScript.txt | 461 +-- .../lazyResolve/functions/contractScript2.txt | 461 +-- .../functionCallWithGenericResultScript.txt | 405 ++- .../functions/functionParameterScript.txt | 181 +- ...ionWithGenericExpectedTypeInsideScript.txt | 531 +-- .../functionWithTypeParametersScript.txt | 153 +- ...archyWithOverrideAndNestedClass2Script.txt | 1681 +++++----- ...archyWithOverrideAndNestedClass3Script.txt | 1681 +++++----- ...rarchyWithOverrideAndNestedClassScript.txt | 1681 +++++----- .../functions/hierarchyWithOverrideScript.txt | 657 ++-- .../lambdaAsSAMInterfaceScript.txt | 531 +-- .../lazyResolve/lazyPropertyScript.txt | 1077 ++++--- .../lazyResolve/localConstructorScript.txt | 727 +++-- ...ocalFunctionInsideAnnotationCallScript.txt | 447 +-- ...calFunctionInsideFunctionLiteralScript.txt | 475 +-- ...deLambdaCallInsideStringTemplateScript.txt | 531 +-- .../localFunctionInsideStatement.txt | 825 ++--- ...ocalFunctionInsideStringTemplateScript.txt | 419 ++- ...ocalFunctionInsideSuperEntryCallScript.txt | 657 ++-- .../lazyResolve/localNestedClassScript.txt | 937 +++--- ...calParameterInsideSuperEntryCallScript.txt | 657 ++-- ...lerRequiredAnnotationsInsideBodyScript.txt | 855 ++--- .../lazyResolve/nestedTypeAlias2Script.txt | 363 ++- .../parameterOfNonLocalSetterScript.txt | 349 +- .../parameterOfTopSetterScript.txt | 237 +- .../primaryConstructorParameterScript.txt | 295 +- .../primaryConstructorPropertyScript.txt | 379 ++- .../lazyResolve/primaryConstructorScript.txt | 267 +- ...archyWithOverrideAndNestedClass2Script.txt | 1765 +++++----- ...archyWithOverrideAndNestedClass3Script.txt | 1625 +++++----- ...archyWithOverrideAndNestedClass4Script.txt | 1849 ++++++----- ...rarchyWithOverrideAndNestedClassScript.txt | 1737 +++++----- .../hierarchyWithOverrideScript.txt | 713 ++-- ...rtyGetterWithExplicitTypeAndBodyScript.txt | 209 +- .../propertyGetterWithExplicitTypeScript.txt | 209 +- .../propertyGetterWithImplicitTypeScript.txt | 209 +- .../properties/propertySetterScript.txt | 209 +- .../propertyWithTypeParametersScript.txt | 209 +- .../propertyWithGetterAndSetterScript.txt | 433 ++- .../lazyResolve/propertyWithGetterScript.txt | 349 +- .../propertyWithInitializerScript.txt | 251 +- .../lazyResolve/redeclarationScript.txt | 335 +- .../resolveSuperTypeFromLocalClassScript.txt | 503 +-- ...lveTypeFromLocalClassConstructorScript.txt | 671 ++-- .../resolveTypeFromLocalFunctionScript.txt | 643 ++-- .../testdata/lazyResolve/script.txt | 1679 +++++----- .../testdata/lazyResolve/script2.txt | 993 +++--- .../secondaryConstructorParameterScript.txt | 533 +-- .../secondaryConstructorScript.txt | 405 ++- .../testdata/lazyResolve/statement.txt | 951 +++--- .../testdata/lazyResolve/statement2.txt | 699 ++-- .../testdata/lazyResolve/superTypesScript.txt | 461 +-- .../lazyResolve/topLevelFunctionsScript.txt | 349 +- ...ithExpressionBodyAndExplicitTypeScript.txt | 349 +- .../typeAliasWithTypeParametersScript.txt | 125 +- .../lazyResolve/typeParameterBoundsScript.txt | 419 ++- .../typeParameterOfClass2Script.txt | 293 +- .../typeParameterOfClassScript.txt | 267 +- .../typeParameterOfNonLocalFunctionScript.txt | 267 +- .../typeParameterOfTopFunctionScript.txt | 153 +- .../typeParameterOfTopSetterScript.txt | 209 +- .../typeParameterOfTypeAliasScript.txt | 251 +- .../kotlin/fir/renderer/FirRenderer.kt | 23 + 234 files changed, 38820 insertions(+), 29149 deletions(-) diff --git a/analysis/low-level-api-fir/testdata/fileStructure/classMemberPropertyScript.lazy.resolve.txt b/analysis/low-level-api-fir/testdata/fileStructure/classMemberPropertyScript.lazy.resolve.txt index 21f260bae82..b4e854bbd13 100644 --- a/analysis/low-level-api-fir/testdata/fileStructure/classMemberPropertyScript.lazy.resolve.txt +++ b/analysis/low-level-api-fir/testdata/fileStructure/classMemberPropertyScript.lazy.resolve.txt @@ -1,23 +1,27 @@ FILE: [ResolvedTo(IMPORTS)] classMemberPropertyScript.kts - public final [ResolvedTo(STATUS)] class X : R|kotlin/Any| { - public [ResolvedTo(STATUS)] constructor(): R|X| { - super() + context(