From 1a3d9b66e8c7e99ecd3b96bb3f118f3931ee5e4e Mon Sep 17 00:00:00 2001 From: Vladimir Dolzhenko Date: Fri, 6 May 2022 14:57:35 +0200 Subject: [PATCH] [kotlin] Add intention to show/hide Kotlin inlay hints #KTIJ-214 Fixed GitOrigin-RevId: 2b6ce81d05664f6587d3491fa3ce1b58393203c6 --- .../AbstractHighLevelQuickFixMultiFileTest.kt | 3 +- .../messages/KotlinBundle.properties | 19 +++ .../hints/EnableKotlinTypeHintsOption.kt | 79 +++++++++++++ .../kotlin/idea/codeInsight/hints/HintType.kt | 109 +++++++++++------- .../hints/KotlinAbstractHintsProvider.kt | 11 ++ .../hints/KotlinCallChainHintsProvider.kt | 4 + .../KotlinCodeAuthorInlayHintsProvider.kt | 4 + .../hints/KotlinInlayHintsTopHitProvider.kt | 3 + .../hints/KotlinLambdasHintsProvider.kt | 24 +++- .../KotlinReferencesTypeHintsProvider.kt | 24 +++- .../hints/KotlinValuesHintsProvider.kt | 21 +++- .../intentions/IntentionTestGenerated.java | 18 +++ .../quickfix/AbstractQuickFixMultiFileTest.kt | 14 ++- .../AbstractQuickFixMultiModuleTest.kt | 16 +++ .../idea/stubs/AbstractMultiModuleTest.kt | 7 ++ .../testData/intentions/inlayHints/.intention | 1 + .../intentions/inlayHints/localVariable.kt | 6 + .../inlayHints/localVariable.kt.after | 6 + .../intentions/inlayHints/property.kt | 3 + .../intentions/inlayHints/property.kt.after | 3 + .../js/js_dep(stdlib)/js.kt | 1 + .../jvmWithoutStdlib/jvm/jvm.kt | 1 + .../createExpect/noAccessOnMember/jvm/My.kt | 1 + .../createExpect/typeAlias/jvm/My.kt | 1 + .../addCancellationException2/native/test.kt | 1 + .../addCancellationException3/native/test.kt | 1 + .../addCancellationException4/native/test.kt | 1 + .../jvm/jvm.kt | 1 + .../jvm/jvm.kt | 1 + .../jvm/jvm.kt | 1 + .../notMoveToActualConstructor/jvm/jvm.kt | 1 + .../jvm/jvm.kt | 1 + .../other/addActualToClass/jvm/jvm.kt | 1 + .../addActualToTopLevelMember/jvm/jvm.kt | 1 + .../header/header.kt | 1 + .../other/createTestOnExpect/header/header.kt | 1 + .../jvm/b.kt | 1 + .../header/header.kt | 1 + .../safeDeleteForbiddenFromActual/jvm/jvm.kt | 1 + .../jvm/jvm.kt | 1 + .../actualMethod/jvm/jvm.kt | 1 + .../actualTopLevelFunction/jvm/jvm.kt | 1 + .../actualTopLevelProperty/jvm/jvm.kt | 1 + .../abstract/makeInlineClassAbstract.kt | 3 +- .../use-site_field_member_with_delegate.kt | 1 + .../use-site_field_toplevel_with_delegate.kt | 1 + .../quickfix/addDataModifier/abstract.kt | 1 + .../quickfix/addDataModifier/inner.kt | 1 + .../addDataModifier/invisibleParameter.kt | 1 + .../addDataModifier/invisibleParameter2.kt | 1 + .../quickfix/addDataModifier/noParameter.kt | 1 + .../quickfix/addDataModifier/notVarVal.kt | 1 + .../testData/quickfix/addDataModifier/open.kt | 1 + .../quickfix/addDataModifier/sealed.kt | 1 + .../quickfix/addDataModifier/vararg.kt | 1 + .../expectAnnotation3.kt | 1 + .../quickfix/addEqEqTrue/notBoolean.kt | 1 + .../iterableWithBadIterator.kt | 1 + .../addExclExclCall/nullInitializer.kt | 1 + .../smartcastImpossibleForReceiver.kt | 1 + .../smartcastImpossibleForReceiver.kt.after | 1 + .../quickfix/addInitializer/localVar.kt | 1 + .../topLevelExtensionProperty.kt | 1 + .../topLevelExtensionPropertySetterOnly.kt | 1 + .../topLevelPropertyWithDelegateRuntime.kt | 1 + .../topLevelPropertyWithGetter.kt | 1 + .../notSubtype.kt | 1 + .../nothing.kt | 1 + .../typeError.kt | 1 + .../typeError2.kt | 9 +- .../cast/extensionReceiver.kt | 1 + .../cast/extensionReceiver2.kt | 1 + .../cast/genericTypeParameter2.kt | 1 + .../cast/genericTypeParameter5.kt | 1 + .../assignToProperty/differentNameProperty.kt | 1 + .../differentNameProperty2.kt | 1 + .../assignToProperty/differentTypeProperty.kt | 1 + .../differentTypeProperty2.kt | 1 + .../quickfix/assignToProperty/noProperty.kt | 1 + .../quickfix/assignToProperty/valProperty.kt | 1 + .../quickfix/assignToProperty/valProperty2.kt | 1 + .../quickfix/autoImports/builtInFunction.kt | 1 + .../builtInFunctionAlreadyExists.kt | 1 + ...mpanionExtensionFunctionAsClassFunction.kt | 1 + .../noImportGenericClassSpecificTypeChild.kt | 1 + ...sionFunctionTypeConstraintWrongReceiver.kt | 1 + ...ionFunctionTypeConstraintWrongReceiver2.kt | 1 + ...eExtensionFunctionVariableWrongReceiver.kt | 1 + ...rtIntTypeExtensionFunctionWrongReceiver.kt | 1 + .../noImportIrrelevantFunctions1.kt | 1 + .../noImportIrrelevantFunctions2.kt | 1 + .../noImportIrrelevantFunctions3.kt | 1 + .../noImportIrrelevantFunctions4.kt | 1 + .../noImportThisExtensionReceiverWrongType.kt | 1 + .../autoImports/delegateNoOperator.test | 1 + .../autoImports/excludedCoroutineImpl.kt | 11 +- .../excludedCoroutineIntrinsics.kt | 1 + .../autoImports/excludedFromImport.kt | 9 +- .../falsePostfixOperator.before.Main.kt | 1 + .../importEnumValueMissingReceiver.kt | 1 + .../importFunctionMissingReceiver.kt | 1 + ...ortFunctionMissingReceiverWithTypeAlias.kt | 1 + .../indexCallExtensionGetNoOperator.test | 1 + ...lNoImportWhenGetNeededButSetAvailable.test | 1 + ...lNoImportWhenSetNeededButGetAvailable.test | 1 + .../autoImports/infixCall2.before.Main.kt | 1 + .../invokeExtensionNoOperator.test | 1 + .../memberImportNotForClassFunction.test | 1 + .../memberImportNotForClassProperty.test | 3 +- .../memberImportNotForJavaNonStaticField.test | 3 +- ...memberImportNotForJavaNonStaticMethod.test | 1 + .../memberImportNotForTopLevelFunction.test | 1 + ...clarationExtensionComponentNoOperator.test | 1 + .../noFunctionImportOnSimpleName.test | 1 + ...rtForFunInQualifiedNotFirst.before.Main.kt | 1 + .../quickfix/autoImports/noImportForIndex.kt | 1 + .../noImportForNestedInPrivate.before.Main.kt | 1 + .../noImportForPrivateClass.before.Main.kt | 1 + .../noImportForPrivateFunction.before.Main.kt | 1 + .../noImportInImports.before.Main.kt | 3 +- ...QualifiedExpressionNotFirst.before.Main.kt | 3 +- ...QualifiedExpressionNotFirst.before.Main.kt | 5 +- .../noMemberFunctionImportOnSimpleName.test | 1 + .../notExcludedFromImportWhenInternalUse.kt | 1 + ...ExcludedFromImportWhenInternalUse.kt.after | 1 + .../quickfix/autoImports/notForThisLabel.kt | 1 + .../autoImports/packageClass.before.Main.kt | 3 +- ...lusOperatorWithTypeMismatch.before.Main.kt | 1 + .../nonPublic/reifiedTypeParameter.kt | 5 +- .../protected/reifiedTypeParameter.kt | 1 + .../super/reifiedTypeParameter.kt | 1 + .../removeUnusedParameterOfPropertySetter.kt | 1 + .../changeToLabeledReturn/multipleInner.kt | 1 + .../multipleInner.kt.after | 1 + .../changeToLabeledReturn/multipleOuter.kt | 1 + .../multipleOuter.kt.after | 1 + .../changeToLabeledReturn/noCandidates.kt | 1 + .../nullForNonnullType2.kt | 1 + .../returnNotAllowedInClass.kt | 1 + .../returnNotAllowedInObject.kt | 1 + .../changeToLabeledReturn/typeMismatch2.kt | 1 + .../quickfix/changeToMutableCollection/set.kt | 1 + .../hasInitializer.kt | 1 + .../notPrimitive.kt | 1 + .../nullablePrimitive.kt | 1 + .../val.kt | 1 + .../convertToAnonymousObject/multiMethod.kt | 1 + .../callWithFinalJavaSupertype.before.Main.kt | 3 +- .../callExpression/callWithFinalSupertype.kt | 3 +- ...allWithGroovyClassQualifier.before.Main.kt | 1 + .../callWithLibClassQualifier.kt | 1 + .../callExpression/typeArguments/extension.kt | 1 + .../createSuperClassFromSuperTypeEntry2.kt | 1 + ...eateSuperClassFromSuperTypeEntry2.kt.after | 1 + .../createSuperClassFromSuperTypeEntry3.kt | 1 + ...eateSuperClassFromSuperTypeEntry3.kt.after | 1 + .../classWithGroovyQualifier.before.Main.kt | 1 + .../enumEntryInJavaEnum.before.Main.kt | 1 + .../importDirective/enumEntryInPackage.kt | 5 +- .../importDirective/enumEntryWithQualifier.kt | 5 +- .../objectWithJavaQualifier.before.Main.kt | 3 +- ...lassByNestedGroovyQualifier.before.Main.kt | 3 +- .../referenceExpression/classInPackage.kt | 1 + .../referenceExpression/classWithQualifier.kt | 5 +- .../referenceExpression/classWithReceiver.kt | 1 + ...mEntryWithJavaEnumQualifier.before.Main.kt | 1 + ...EntryWithJavaEnumSuperclass.before.Main.kt | 1 + ...tryWithJavaNonEnumQualifier.before.Main.kt | 1 + ...ryWithJavaNonEnumSuperclass.before.Main.kt | 1 + .../enumEntryWithQualifier.kt | 5 +- .../enumEntryWithReceiver.kt | 1 + .../enumEntryWithSuperclass.kt | 3 +- .../objectForEnumInEquals.kt | 5 +- .../objectWithJavaQualifier.before.Main.kt | 1 + .../referenceExpression/objectWithReceiver.kt | 1 + .../referenceExpression/recursiveBound.kt | 3 +- .../annotationNotQualifierWithTypeArgs.kt | 3 +- .../annotationQualifierNoTypeArgs.kt | 9 +- .../enumEntryNotQualifierNoTypeArgs.kt | 7 +- .../enumNotQualifierWithTypeArgs.kt | 3 +- .../typeReference/noAnnotationForTypeBound.kt | 3 +- .../typeReference/noEnumForTypeBound.kt | 3 +- .../typeReference/noObjectForTypeBound.kt | 3 +- .../objectNotQualifierNoTypeArgs.kt | 7 +- .../objectNotQualifierWithTypeArgs.kt | 3 +- .../createFunction/call/abstract/companion.kt | 1 + .../call/abstract/noAbstractSuperclass.kt | 1 + .../abstract/notWritableAbstractSuperclass.kt | 1 + .../call/abstract/otherExplicitReceiver.kt | 3 +- .../call/binaryOperationInCall.kt | 1 + .../call/extensionRefInImport.kt | 1 + .../call/funOnGroovyType.before.Main.kt | 1 + .../createFunction/call/kt10983.kt | 3 +- .../createFunction/call/notExactArgument.kt | 3 +- .../createFunction/call/propertyOnUserType.kt | 1 + .../createFunction/call/refInImport.kt | 1 + ...aticExtensionFunOnJavaClass.before.Main.kt | 1 + .../staticFunOnJavaInterface.before.Main.kt | 1 + .../memberWithTypeParameterAsReceiver.kt | 5 +- .../callableReferences/noFunctionalType.kt | 3 +- .../inContainingDeclaration/inProperty.kt | 1 + .../inContainingDeclaration/inProperty2.kt | 1 + .../inContainingDeclaration/inProperty3.kt | 1 + .../inSuperTypeEntry.kt | 1 + .../inContainingDeclaration/typeQualifier.kt | 1 + .../withTypeArguments.kt | 1 + .../notOnTypeArgumentList.kt | 1 + .../localVariable/callableRef.kt | 5 +- .../localVariable/inAccessor.kt | 1 + .../localVariable/inAccessor.kt.after | 1 + .../inAccessorWithExpressionBody.kt | 1 + .../inAccessorWithExpressionBody.kt.after | 1 + .../localVariable/inAnnotation.kt | 1 + .../localVariable/inBinaryOperation.kt | 1 + .../createVariable/localVariable/inClass.kt | 5 +- .../localVariable/inDefaultValue.kt | 1 + .../localVariable/inDefaultValueLocalFun.kt | 1 + .../inDefaultValueLocalFun.kt.after | 1 + .../createVariable/localVariable/inFun.kt | 1 + .../localVariable/inFun.kt.after | 1 + .../localVariable/inFunWithExpressionBody.kt | 1 + .../inFunWithExpressionBody.kt.after | 1 + .../localVariable/inLabelRef.kt | 1 + .../localVariable/inLambdaNoParams.kt | 1 + .../localVariable/inLambdaNoParams.kt.after | 1 + .../localVariable/inLambdaWithParams.kt | 1 + .../localVariable/inLambdaWithParams.kt.after | 1 + .../inMultiLineLambdaNoParams.kt | 1 + .../inMultiLineLambdaNoParams.kt.after | 1 + .../inMultiLineLambdaWithParams.kt | 1 + .../inMultiLineLambdaWithParams.kt.after | 1 + .../localVariable/localWithPackageName.kt | 1 + .../localWithPackageName.kt.after | 1 + .../localVariable/nonIdentifier.kt | 1 + .../localVariable/onTopLevel.kt | 3 +- .../localVariable/qualifiedInFun.kt | 1 + .../localVariable/unitTypedInFun.kt | 1 + .../localVariable/unitTypedInFun.kt.after | 1 + .../createVariable/parameter/assignedInFun.kt | 3 +- .../createVariable/parameter/callableRef.kt | 5 +- ...rtyByDestructuringEntryWithSkippedIndex.kt | 1 + .../parameter/inAccessorInClassObject.kt | 1 + .../parameter/inAccessorInObject.kt | 1 + .../parameter/inAccessorInTrait.kt | 3 +- .../parameter/inAccessorNoClass.kt | 1 + .../parameter/inBinaryOperation.kt | 1 + .../parameter/inClassObjectInitializer.kt | 3 +- .../parameter/inGenAccessorInClass.kt | 3 +- .../parameter/inGenAccessorInGenClass.kt | 3 +- .../createVariable/parameter/inLabelRef.kt | 1 + .../parameter/inLambdaNoParams.kt | 1 + .../parameter/inLambdaNoParams.kt.after | 1 + .../parameter/inLambdaWithIt.kt | 1 + .../parameter/inLambdaWithIt.kt.after | 1 + .../parameter/inLambdaWithParams.kt | 1 + .../parameter/inLambdaWithParams.kt.after | 1 + .../parameter/inLambdaWithTypedParams.kt | 1 + .../inLambdaWithTypedParams.kt.after | 1 + .../parameter/inMultiLineLambdaNoParams.kt | 1 + .../inMultiLineLambdaNoParams.kt.after | 1 + .../inPropertyInitializerInClassObject.kt | 3 +- .../inPropertyInitializerInObject.kt | 3 +- .../parameter/inPropertyInitializerNoClass.kt | 3 +- .../createVariable/parameter/nonIdentifier.kt | 1 + .../parameter/qualifiedInFun.kt | 1 + .../primaryParameter/localValNoReceiver.kt | 3 +- .../objectMemberValNoReceiver.kt | 1 + .../staticValOnJavaClass.before.Main.kt | 1 + .../primaryParameter/topLevelValNoReceiver.kt | 3 +- .../primaryParameter/valOnCompanionObject.kt | 3 +- .../valOnJavaType.before.Main.kt | 1 + .../primaryParameter/valOnLibType.kt | 1 + .../abstract/otherExplicitReceiver.kt | 3 +- .../createVariable/property/callOnUserType.kt | 1 + .../createVariable/property/callableRef.kt | 5 +- .../property/extensionRefInImport.kt | 1 + .../property/inBinaryOperation.kt | 1 + .../createVariable/property/inLabelRef.kt | 1 + .../property/localValNoReceiver.kt | 3 +- .../memberWithTypeParameterAsReceiver.kt | 5 +- .../createVariable/property/refInImport.kt | 1 + ...taticExtensionValOnJavaType.before.Main.kt | 1 + .../staticVarOnJavaInterface.before.Main.kt | 1 + .../property/valOnGroovyType.before.Main.kt | 1 + .../valOnJavaInterface.before.Main.kt | 1 + .../createLabel/breakInlambdaBeforeLoop.kt | 1 + .../quickfix/createLabel/breakNoLoop.kt | 1 + .../quickfix/createLabel/continueNoLoop.kt | 1 + .../quickfix/createLabel/returnNoLambda.kt | 1 + .../decreaseVisibility/exposedReceiverType.kt | 1 + .../decreaseVisibility/exposedSuperClass.kt | 1 + .../exposedSuperClass.kt.after | 1 + .../exposedSuperClassProtectedBase.kt | 1 + .../exposedSuperClassProtectedBase.kt.after | 1 + .../exposedSuperInterface.kt | 1 + .../exposedSuperInterface.kt.after | 1 + .../exposedSuperInterfacePrivate.kt | 1 + .../exposedSuperInterfacePrivate.kt.after | 1 + .../exposedTypeInAnnotation.kt | 1 + .../exposedTypeParameterBound.kt | 1 + .../exposedTypeParameterBound.kt.after | 1 + .../exposedTypeParameterBoundNested.kt | 1 + .../javaDeprecated.before.Main.kt | 2 +- ...ndWithDeprecatedArgumentsAndConstructor.kt | 1 + .../typeAliases/conflictOnTypeAndAlias.kt | 1 + .../typeAliases/transitiveFromClass.kt | 1 + .../basicFunctionNotApplicable.kt | 7 +- .../experimental/experimentalUnused.kt | 1 + .../localVariableNoGetterAction.kt | 1 + .../quickfix/experimental/nestedClasses.kt | 11 +- .../quickfix/experimental/override.kt | 9 +- .../quickfix/experimental/typeAlias.kt | 1 + .../quickfix/experimental/typeAlias.kt.after | 1 + .../removeBraces/getterHasComment.kt | 3 +- .../removeBraces/getterHasMultiStatements.kt | 3 +- .../removeBraces/getterHasNoStatement.kt | 3 +- .../removeBraces/getterIsUsed.kt | 3 +- .../wrapRun/getterIsUsed.kt | 3 +- .../testData/quickfix/implement/annotation.kt | 1 + .../tests/testData/quickfix/implement/enum.kt | 3 +- .../testData/quickfix/implement/finalClass.kt | 1 + .../testData/quickfix/importAlias/simple.kt | 1 + .../quickfix/importAlias/simple.kt.after | 1 + .../importAlias/unresolvedReference.kt | 1 + .../increaseVisibility/exposedReceiverType.kt | 1 + .../exposedReceiverType.kt.after | 1 + .../increaseVisibility/exposedSuperClass.kt | 1 + .../exposedSuperClass.kt.after | 1 + .../exposedSuperClassProtectedBase.kt | 1 + .../exposedSuperClassProtectedBase.kt.after | 1 + .../exposedSuperInterface.kt | 1 + .../exposedSuperInterface.kt.after | 1 + .../exposedTypeParameterBound.kt | 1 + .../exposedTypeParameterBound.kt.after | 1 + .../exposedTypeParameterBoundNested.kt | 1 + .../exposedTypeParameterBoundNested.kt.after | 1 + .../invalidSealedClassInheritance.kt | 1 + .../invisibleFake/methodToNotProtected.kt | 3 +- .../invisibleFake/propertyToNotProtected.kt | 5 +- .../privateMemberToInternalWithExposed.kt | 5 +- .../privateSealedClassInheritance.kt | 1 + .../privateSealedClassInheritance.kt.after | 1 + .../privateSetterToInternal.kt | 1 + .../privateSetterToInternal.kt.after | 1 + .../privateSetterToPublic.kt | 1 + .../privateSetterToPublic.kt.after | 1 + .../getter.before.Main.kt | 1 + .../conflictingExtension/varInsteadOfVal.kt | 1 + .../conflictingExtension/wrongExplicitThis.kt | 1 + .../wrongExplicitThis2.kt | 1 + .../conflictingExtension/wrongGetter.kt | 1 + .../conflictingExtension/wrongGetter2.kt | 1 + .../conflictingExtension/wrongSetter.kt | 1 + .../migration/jsExternal/nestedExtension01.kt | 1 + .../finalJavaSupertype.before.Main.kt | 1 + .../finalJavaUpperBound.before.Main.kt | 1 + .../modifiers/nestedAnnotationClass.kt | 1 + .../quickfix/modifiers/nestedDataClass.kt | 1 + .../quickfix/modifiers/nestedEnumClass.kt | 1 + .../quickfix/modifiers/nestedInterface.kt | 1 + .../quickfix/modifiers/nestedObject.kt | 1 + .../quickfix/modifiers/nestedSealedClass.kt | 1 + .../quickfix/modifiers/noAbstractForObject.kt | 3 +- .../modifiers/suspend/anonymousFunction.kt | 1 + .../quickfix/modifiers/suspend/inLambda2.kt | 1 + .../quickfix/modifiers/suspend/init.kt | 1 + .../moveReceiverAnnotation/notExtensionFun.kt | 7 +- .../nullables/unsafeInfixCall/noComparison.kt | 3 +- .../unsafeComparisonInCondition.kt | 3 +- .../unsafeComparisonInLogic.kt | 3 +- .../unsafeInfixCall/unsafeComparisonInWhen.kt | 5 +- .../unsafeComparisonInWhile.kt | 3 +- .../unsafeInvokeWithImplicitReceiver.kt | 1 + .../unsafeInvokeWithReceiver.kt | 3 +- ...OfferToImplementMembersForExpectedClass.kt | 3 +- .../overridingOpenMethodInFinalClass.kt | 1 + .../primitiveCastToConversion/boolean.kt | 1 + .../dontShowQuickfixOnExistingAccessors.kt | 1 + .../quickfix/redundantIf/assignmentFake.kt | 3 +- .../removeRedundantAssignment/notRedundant.kt | 1 + .../removeSingleLambdaParameter/inIf.kt | 3 +- .../removeSingleLambdaParameter/inWhen.kt | 3 +- .../propertyWithImplicitType.kt | 7 +- .../quickfix/removeUnused/importEnumValues.kt | 3 +- .../quickfix/removeUnused/importObjectFun.kt | 1 + .../quickfix/removeUnused/usedClassAsAlias.kt | 1 + .../removeUnused/usedObjectAsAlias.kt | 1 + .../usedObjectAsAliasMulti.before.Main.kt | 1 + ...ionExpressionParameterNoRemoveParameter.kt | 5 +- .../lambdaParameterNoRemoveParameter.kt | 5 +- .../noActionForCommonFunction.kt | 1 + .../divAssignOnMutableMap.kt | 1 + .../minusAssignOnMutableMap.kt | 1 + .../plusAssignOnMutableMap.kt | 1 + .../remAssignOnMutableMap.kt | 1 + .../timesAssignOnMutableMap.kt | 1 + .../replaceJvmFieldWithConst/getter.kt | 1 + .../replaceJvmFieldWithConst/nullable.kt | 5 +- ...oReplaceWithSafeCallForImplicitReceiver.kt | 1 + .../applyWithFake.kt | 1 + .../applyWithThisLabeledFake.kt | 3 +- .../letWithWrongImplicitThis.kt | 7 +- .../letWithWrongParam.kt | 3 +- .../notInsideScope.kt | 1 + .../addSourceRetention/binaryRetention.kt | 1 + .../addSourceRetention/emptyRetention.kt | 1 + .../addSourceRetention/emptyRetention2.kt | 1 + .../changeRetentionToSource/noRetention.kt | 1 + .../ifThenElseMultiStatement.kt | 1 + .../ifThenMultiStatement.kt | 1 + .../specifyOverrideExplicitly/notPossible.kt | 5 +- .../addParenthesisForInvalidSealedClass.kt | 1 + .../suppress/external/suppressActive.kt | 5 +- .../chainedUnsafeCall.kt | 3 +- .../expressionUnsafeCall.kt | 1 + .../surroundWithNullCheck/inLambda2.kt | 3 +- .../unsafeCallInDeclaration.kt | 1 + .../unsafeCallInGetter.kt | 1 + .../surroundWithNullCheck/unstableValue.kt | 5 +- .../changeTypeToMutable/noInitializer.kt | 1 + .../changeTypeToMutable/notLocal.kt | 1 + .../joinWithInitializer/noInitializer.kt | 1 + .../joinWithInitializer/notLocal.kt | 1 + .../joinWithInitializer/used.kt | 1 + .../replaceWithAssignment/differentType.kt | 1 + .../replaceWithAssignment/listOf.kt | 1 + .../replaceWithAssignment/mapOf.kt | 1 + .../replaceWithAssignment/minusEq.kt | 1 + .../replaceWithAssignment/noInitializer.kt | 1 + .../replaceWithAssignment/notEmpty.kt | 1 + .../replaceWithAssignment/notLocal.kt | 1 + .../replaceWithAssignment/setOf.kt | 1 + .../replaceWithAssignment/used.kt | 1 + .../replaceWithFilter/map.kt | 1 + .../replaceWithFilter/notIterable.kt | 1 + .../replaceWithFilter/plusEq.kt | 1 + .../replaceWithOrdinaryAssignment/simple.kt | 1 + .../simple.kt.after | 1 + .../tooLongCharLiteralToString/backslash.kt | 1 + .../startWithBackslashInString.kt | 3 +- .../quickfix/typeAddition/propertyHasType.kt | 1 + .../typeAddition/publicFunWithoutBody.kt | 3 +- .../typeMismatch/casts/typeMismatch2.kt | 1 + .../testData/quickfix/typeMismatch/kt25928.kt | 1 + .../changeFunctionParameterType4.kt | 3 +- ...dontChangeFunctionReturnTypeToErrorType.kt | 3 +- .../multiFakeOverride.kt | 1 + .../variableInitializedWithNull2.kt | 3 +- .../variableInitializedWithNull3.kt | 3 +- .../variableInitializedWithNull4.kt | 3 +- .../quickfix/typeOfAnnotationMember/star.kt | 3 +- .../quickfix/typeOfAnnotationMember/string.kt | 7 +- .../notForDeprecated.kt | 1 + .../unusedSuppressAnnotation/notForJava.kt | 3 +- .../notForJetBrains.kt | 3 +- .../changeMutability/funParameter.kt | 1 + ...nusedVariableInDestructuringDeclaration.kt | 1 + ...ariableWithAnonymousFunctionInitialize1.kt | 1 + .../unusedVariableWithLambdaInitializer1.kt | 1 + ...emainingBranchesMissingRightParenthesis.kt | 1 + .../quickfix/when/notRedundantBranch.kt | 1 + .../wrapWithSafeLetCall/chainedUnsafeCall.kt | 1 + .../expressionUnsafeCall.kt | 1 + .../wrapWithSafeLetCall/extensionMethod.kt | 1 + .../wrapWithSafeLetCall/inOperator.kt | 1 + .../wrapWithSafeLetCall/nullableReceiver.kt | 1 + .../unsafeForNullableParameter.kt | 3 +- .../wrapWithSafeLetCall/unstableValue.kt | 3 +- .../wrapAllNonNullablePositions6.kt | 1 + .../plugin/resources/META-INF/inspections.xml | 4 + .../idea/test/DirectiveBasedActionUtils.kt | 2 +- 471 files changed, 932 insertions(+), 221 deletions(-) create mode 100644 plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/EnableKotlinTypeHintsOption.kt create mode 100644 plugins/kotlin/idea/tests/testData/intentions/inlayHints/.intention create mode 100644 plugins/kotlin/idea/tests/testData/intentions/inlayHints/localVariable.kt create mode 100644 plugins/kotlin/idea/tests/testData/intentions/inlayHints/localVariable.kt.after create mode 100644 plugins/kotlin/idea/tests/testData/intentions/inlayHints/property.kt create mode 100644 plugins/kotlin/idea/tests/testData/intentions/inlayHints/property.kt.after diff --git a/plugins/kotlin/fir/test/org/jetbrains/kotlin/idea/fir/quickfix/AbstractHighLevelQuickFixMultiFileTest.kt b/plugins/kotlin/fir/test/org/jetbrains/kotlin/idea/fir/quickfix/AbstractHighLevelQuickFixMultiFileTest.kt index ea53ef2b2b8f..f41fd30abfc5 100644 --- a/plugins/kotlin/fir/test/org/jetbrains/kotlin/idea/fir/quickfix/AbstractHighLevelQuickFixMultiFileTest.kt +++ b/plugins/kotlin/fir/test/org/jetbrains/kotlin/idea/fir/quickfix/AbstractHighLevelQuickFixMultiFileTest.kt @@ -7,6 +7,7 @@ import com.intellij.psi.PsiFile import org.jetbrains.kotlin.idea.quickfix.AbstractQuickFixMultiFileTest import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.test.utils.IgnoreTests +import java.io.File import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths @@ -26,7 +27,7 @@ abstract class AbstractHighLevelQuickFixMultiFileTest : AbstractQuickFixMultiFil override fun checkForUnexpectedErrors(file: KtFile) {} - override fun checkAvailableActionsAreExpected(file: PsiFile, actions: Collection) {} + override fun checkAvailableActionsAreExpected(file: File, actions: Collection) {} private fun Path.getAfterFileIfExists(): Path? { val afterFileName = fileName.toString().removeSuffix(".before.Main.kt") + ".after.kt" diff --git a/plugins/kotlin/frontend-independent/resources-en/messages/KotlinBundle.properties b/plugins/kotlin/frontend-independent/resources-en/messages/KotlinBundle.properties index 8c129b255c2d..4a377f86e1b4 100644 --- a/plugins/kotlin/frontend-independent/resources-en/messages/KotlinBundle.properties +++ b/plugins/kotlin/frontend-independent/resources-en/messages/KotlinBundle.properties @@ -455,6 +455,25 @@ hints.settings.types.return=Function return types hints.settings.types.parameter=Function parameter types hints.settings.values.ranges=Ranges +hints.settings.show.types.property=Show property type hints +hints.settings.dont.show.types.property=Do not show property type hints +hints.settings.show.types.variable=Show local variable type hints +hints.settings.dont.show.types.variable=Do not show local variable type hints +hints.settings.show.types.return=Show function return type hints +hints.title.show.argument.name.enabled=Show argument name hints +hints.title.dont.show.argument.name.enabled=Do not show argument name hints +hints.settings.dont.show.types.return=Do not show function return type hints +hints.settings.show.types.parameter=Show function parameter type hints +hints.settings.dont.show.types.parameter=Do not show function parameter type hints +hints.settings.show.lambda.return=Show return expression hints +hints.settings.dont.show.lambda.return=Do not show return expression hints +hints.settings.show.lambda.receivers.parameters=Show implicit receiver and parameter hints +hints.settings.dont.show.lambda.receivers.parameters=Do not show implicit receiver and parameter hints +hints.settings.show.suspending=Show suspending call hints +hints.settings.dont.show.suspending=Do not show suspending call hints +hints.settings.show.ranges=Show range hints +hints.settings.dont.show.ranges=Do not show range hints + hints.settings.lambdas=Lambdas hints.settings.lambda.return=Return expressions hints.settings.lambda.receivers.parameters=Implicit receivers and parameters diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/EnableKotlinTypeHintsOption.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/EnableKotlinTypeHintsOption.kt new file mode 100644 index 000000000000..28f09c879796 --- /dev/null +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/EnableKotlinTypeHintsOption.kt @@ -0,0 +1,79 @@ +// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package org.jetbrains.kotlin.idea.codeInsight.hints + +import com.intellij.codeInsight.CodeInsightBundle +import com.intellij.codeInsight.hints.* +import com.intellij.codeInsight.intention.HighPriorityAction +import com.intellij.codeInsight.intention.IntentionAction +import com.intellij.codeInspection.util.IntentionName +import com.intellij.openapi.editor.Editor +import com.intellij.openapi.project.Project +import com.intellij.psi.PsiElement +import com.intellij.psi.PsiFile +import com.intellij.psi.util.PsiTreeUtil +import org.jetbrains.kotlin.idea.KotlinLanguage +import org.jetbrains.kotlin.psi.KtFile +import org.jetbrains.kotlin.utils.addToStdlib.safeAs + +@Suppress("IntentionDescriptionNotFoundInspection") +class EnableKotlinTypeHintsOption : IntentionAction, HighPriorityAction { + @IntentionName + private var lastOptionName = "" + + override fun getText(): String = lastOptionName + + override fun getFamilyName(): String = CodeInsightBundle.message("inlay.hints.intention.family.name") + + override fun isAvailable(project: Project, editor: Editor, file: PsiFile): Boolean { + val element = findElement(editor, file) ?: return false + + lastOptionName = "" + for (hintType in HintType.values()) { + findSetting(hintType, project, element)?.let { + val enabled = it.isEnabled(hintType) + lastOptionName = if (enabled) hintType.hideDescription else hintType.showDescription + return true + } + } + return false + } + + override fun invoke(project: Project, editor: Editor, file: PsiFile) { + val element = findElement(editor, file) ?: return + + for (hintType in HintType.values()) { + findSetting(hintType, project, element)?.let { + val enabled = it.isEnabled(hintType) + it.enable(hintType, !enabled) + InlayHintsPassFactory.forceHintsUpdateOnNextPass() + return + } + } + } + + override fun startInWriteAction(): Boolean = false + + private fun findElement(editor: Editor, file: PsiFile): PsiElement? { + if (file !is KtFile) return null + val offset = editor.caretModel.offset + val leaf1 = file.findElementAt(offset) + val leaf2 = file.findElementAt(offset - 1) + return if (leaf1 != null && leaf2 != null) PsiTreeUtil.findCommonParent(leaf1, leaf2) else null + } + + private fun findSetting(hintType: HintType, project: Project, element: PsiElement): KotlinAbstractHintsProvider.HintsSettings? { + if (!hintType.isApplicable(element)) return null + val hintsSettings = InlayHintsSettings.instance() + val providerInfos = InlayHintsProviderFactory.EP.extensionList + .flatMap { it.getProvidersInfo(project) } + .filter { it.language == KotlinLanguage.INSTANCE } + val provider = providerInfos + .firstOrNull { + val hintsProvider = it.provider as? KotlinAbstractHintsProvider ?: return@firstOrNull false + hintsProvider.isHintSupported(hintType) + } + ?.provider?.safeAs>() ?: return null + val settingsKey = provider.key + return hintsSettings.findSettings(settingsKey, KotlinLanguage.INSTANCE, provider::createSettings) + } +} \ No newline at end of file diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt index dfa10037ef43..95496cb4c4a2 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt @@ -4,7 +4,7 @@ package org.jetbrains.kotlin.idea.codeInsight.hints import com.intellij.codeInsight.hints.InlayInfo import com.intellij.codeInsight.hints.Option -import com.intellij.openapi.application.ApplicationManager +import com.intellij.codeInspection.util.IntentionName import com.intellij.psi.PsiElement import org.jetbrains.annotations.Nls import org.jetbrains.kotlin.idea.KotlinBundle @@ -20,39 +20,50 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe import org.jetbrains.kotlin.utils.addToStdlib.safeAs @Suppress("UnstableApiUsage") -enum class HintType(@Nls private val showDesc: String, defaultEnabled: Boolean) { +enum class HintType( + @Nls private val description: String, + @Nls @IntentionName val showDescription: String, + @Nls @IntentionName val hideDescription: String, + defaultEnabled: Boolean +) { PROPERTY_HINT( KotlinBundle.message("hints.settings.types.property"), + KotlinBundle.message("hints.settings.show.types.property"), + KotlinBundle.message("hints.settings.dont.show.types.property"), false ) { - override fun provideHintDetails(elem: PsiElement): List { - return providePropertyTypeHint(elem) + override fun provideHintDetails(e: PsiElement): List { + return providePropertyTypeHint(e) } - override fun isApplicable(elem: PsiElement): Boolean = elem is KtProperty && elem.getReturnTypeReference() == null && !elem.isLocal + override fun isApplicable(e: PsiElement): Boolean = e is KtProperty && e.getReturnTypeReference() == null && !e.isLocal }, LOCAL_VARIABLE_HINT( KotlinBundle.message("hints.settings.types.variable"), + KotlinBundle.message("hints.settings.show.types.variable"), + KotlinBundle.message("hints.settings.dont.show.types.variable"), false ) { - override fun provideHintDetails(elem: PsiElement): List { - return providePropertyTypeHint(elem) + override fun provideHintDetails(e: PsiElement): List { + return providePropertyTypeHint(e) } - override fun isApplicable(elem: PsiElement): Boolean = - (elem is KtProperty && elem.getReturnTypeReference() == null && elem.isLocal) || - (elem is KtParameter && elem.isLoopParameter && elem.typeReference == null) || - (elem is KtDestructuringDeclarationEntry && elem.getReturnTypeReference() == null) + override fun isApplicable(e: PsiElement): Boolean = + (e is KtProperty && e.getReturnTypeReference() == null && e.isLocal) || + (e is KtParameter && e.isLoopParameter && e.typeReference == null) || + (e is KtDestructuringDeclarationEntry && e.getReturnTypeReference() == null) }, FUNCTION_HINT( KotlinBundle.message("hints.settings.types.return"), + KotlinBundle.message("hints.settings.show.types.return"), + KotlinBundle.message("hints.settings.dont.show.types.return"), false ) { - override fun provideHintDetails(elem: PsiElement): List { - (elem as? KtNamedFunction)?.let { namedFunc -> + override fun provideHintDetails(e: PsiElement): List { + (e as? KtNamedFunction)?.let { namedFunc -> namedFunc.valueParameterList?.let { paramList -> provideTypeHint(namedFunc, paramList.endOffset)?.let { return listOf(it) } } @@ -60,16 +71,18 @@ enum class HintType(@Nls private val showDesc: String, defaultEnabled: Boolean) return emptyList() } - override fun isApplicable(elem: PsiElement): Boolean = - elem is KtNamedFunction && !(elem.hasBlockBody() || elem.hasDeclaredReturnType()) + override fun isApplicable(e: PsiElement): Boolean = + e is KtNamedFunction && !(e.hasBlockBody() || e.hasDeclaredReturnType()) }, PARAMETER_TYPE_HINT( KotlinBundle.message("hints.settings.types.parameter"), + KotlinBundle.message("hints.settings.show.types.parameter"), + KotlinBundle.message("hints.settings.dont.show.types.parameter"), false ) { - override fun provideHintDetails(elem: PsiElement): List { - (elem as? KtParameter)?.let { param -> + override fun provideHintDetails(e: PsiElement): List { + (e as? KtParameter)?.let { param -> param.nameIdentifier?.let { ident -> provideTypeHint(param, ident.endOffset)?.let { return listOf(it) } } @@ -77,30 +90,34 @@ enum class HintType(@Nls private val showDesc: String, defaultEnabled: Boolean) return emptyList() } - override fun isApplicable(elem: PsiElement): Boolean = elem is KtParameter && elem.typeReference == null && !elem.isLoopParameter + override fun isApplicable(e: PsiElement): Boolean = e is KtParameter && e.typeReference == null && !e.isLoopParameter }, PARAMETER_HINT( KotlinBundle.message("hints.title.argument.name.enabled"), + KotlinBundle.message("hints.title.show.argument.name.enabled"), + KotlinBundle.message("hints.title.dont.show.argument.name.enabled"), true ) { - override fun provideHints(elem: PsiElement): List { - val callElement = elem.getStrictParentOfType() ?: return emptyList() + override fun provideHints(e: PsiElement): List { + val callElement = e.getStrictParentOfType() ?: return emptyList() return provideArgumentNameHints(callElement) } - override fun isApplicable(elem: PsiElement): Boolean = elem is KtValueArgumentList + override fun isApplicable(e: PsiElement): Boolean = e is KtValueArgumentList }, LAMBDA_RETURN_EXPRESSION( KotlinBundle.message("hints.settings.lambda.return"), + KotlinBundle.message("hints.settings.show.lambda.return"), + KotlinBundle.message("hints.settings.dont.show.lambda.return"), true ) { - override fun isApplicable(elem: PsiElement) = - elem is KtExpression && elem !is KtFunctionLiteral && !elem.isNameReferenceInCall() + override fun isApplicable(e: PsiElement) = + e is KtExpression && e !is KtFunctionLiteral && !e.isNameReferenceInCall() - override fun provideHintDetails(elem: PsiElement): List { - elem.safeAs()?.let { expression -> + override fun provideHintDetails(e: PsiElement): List { + e.safeAs()?.let { expression -> provideLambdaReturnValueHints(expression)?.let { return listOf(it) } } return emptyList() @@ -109,12 +126,14 @@ enum class HintType(@Nls private val showDesc: String, defaultEnabled: Boolean) LAMBDA_IMPLICIT_PARAMETER_RECEIVER( KotlinBundle.message("hints.settings.lambda.receivers.parameters"), + KotlinBundle.message("hints.settings.show.lambda.receivers.parameters"), + KotlinBundle.message("hints.settings.dont.show.lambda.receivers.parameters"), true ) { - override fun isApplicable(elem: PsiElement) = elem is KtFunctionLiteral + override fun isApplicable(e: PsiElement) = e is KtFunctionLiteral - override fun provideHintDetails(elem: PsiElement): List { - elem.safeAs()?.parent.safeAs()?.let { expression -> + override fun provideHintDetails(e: PsiElement): List { + e.safeAs()?.parent.safeAs()?.let { expression -> provideLambdaImplicitHints(expression)?.let { return it } } return emptyList() @@ -123,24 +142,28 @@ enum class HintType(@Nls private val showDesc: String, defaultEnabled: Boolean) SUSPENDING_CALL( KotlinBundle.message("hints.settings.suspending"), + KotlinBundle.message("hints.settings.show.suspending"), + KotlinBundle.message("hints.settings.dont.show.suspending"), false ) { - override fun isApplicable(elem: PsiElement) = elem.isNameReferenceInCall() && isApplicationInternalMode() + override fun isApplicable(e: PsiElement) = e.isNameReferenceInCall() && isApplicationInternalMode() - override fun provideHints(elem: PsiElement): List { - val callExpression = elem.parent as? KtCallExpression ?: return emptyList() + override fun provideHints(e: PsiElement): List { + val callExpression = e.parent as? KtCallExpression ?: return emptyList() return provideSuspendingCallHint(callExpression)?.let { listOf(it) } ?: emptyList() } }, RANGES( KotlinBundle.message("hints.settings.ranges"), + KotlinBundle.message("hints.settings.show.ranges"), + KotlinBundle.message("hints.settings.dont.show.ranges"), true ) { - override fun isApplicable(elem: PsiElement): Boolean = elem is KtBinaryExpression && elem.isRangeExpression() + override fun isApplicable(e: PsiElement): Boolean = e is KtBinaryExpression && e.isRangeExpression() - override fun provideHintDetails(elem: PsiElement): List { - val binaryExpression = elem.safeAs() ?: return emptyList() + override fun provideHintDetails(e: PsiElement): List { + val binaryExpression = e.safeAs() ?: return emptyList() val leftExp = binaryExpression.left ?: return emptyList() val rightExp = binaryExpression.right ?: return emptyList() @@ -167,20 +190,20 @@ enum class HintType(@Nls private val showDesc: String, defaultEnabled: Boolean) }; companion object { - fun resolve(elem: PsiElement): List = - values().filter { it.isApplicable(elem) } + fun resolve(e: PsiElement): List = + values().filter { it.isApplicable(e) } - fun resolveToEnabled(elem: PsiElement?): HintType? = - elem?.let { resolve(it) }?.firstOrNull { it.enabled } + fun resolveToEnabled(e: PsiElement?): HintType? = + e?.let { resolve(it) }?.firstOrNull { it.enabled } } - abstract fun isApplicable(elem: PsiElement): Boolean - open fun provideHints(elem: PsiElement): List = emptyList() - open fun provideHintDetails(elem: PsiElement): List { - return provideHints(elem).map { InlayInfoDetails(it, listOf(TextInlayInfoDetail(it.text))) } + abstract fun isApplicable(e: PsiElement): Boolean + open fun provideHints(e: PsiElement): List = emptyList() + open fun provideHintDetails(e: PsiElement): List { + return provideHints(e).map { InlayInfoDetails(it, listOf(TextInlayInfoDetail(it.text))) } } - val option = Option("SHOW_${this.name}", { this.showDesc }, defaultEnabled) + val option = Option("SHOW_${this.name}", { this.description }, defaultEnabled) val enabled get() = option.get() } diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinAbstractHintsProvider.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinAbstractHintsProvider.kt index 557ed182ccde..715f82705e08 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinAbstractHintsProvider.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinAbstractHintsProvider.kt @@ -7,6 +7,7 @@ import com.intellij.codeInsight.hints.presentation.InlayPresentation import com.intellij.codeInsight.hints.presentation.InsetPresentation import com.intellij.codeInsight.hints.presentation.MenuOnClickPresentation import com.intellij.codeInsight.hints.presentation.PresentationFactory +import com.intellij.lang.Language import com.intellij.openapi.editor.Document import com.intellij.openapi.editor.Editor import com.intellij.openapi.fileTypes.FileType @@ -33,6 +34,10 @@ abstract class KotlinAbstractHintsProvider : InlayHintsProvider { abstract fun isElementSupported(resolved: HintType?, settings: T): Boolean + open fun isHintSupported(hintType: HintType): Boolean = false + + override fun isLanguageSupported(language: Language): Boolean = language == KotlinLanguage.INSTANCE + override fun createFile(project: Project, fileType: FileType, document: Document): PsiFile = createKtFile(project, document, fileType) @@ -155,4 +160,10 @@ abstract class KotlinAbstractHintsProvider : InlayHintsProvider { } data class PresentationAndSettings(val presentation: InlayPresentation, val offset: Int, val relatesToPrecedingText: Boolean) + + abstract class HintsSettings { + abstract fun isEnabled(hintType: HintType): Boolean + + abstract fun enable(hintType: HintType, enable: Boolean) + } } \ No newline at end of file diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinCallChainHintsProvider.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinCallChainHintsProvider.kt index 7ec976b84016..96f267ee46b6 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinCallChainHintsProvider.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinCallChainHintsProvider.kt @@ -7,12 +7,14 @@ import com.intellij.codeInsight.hints.SettingsKey import com.intellij.codeInsight.hints.chain.AbstractCallChainHintsProvider import com.intellij.codeInsight.hints.presentation.InlayPresentation import com.intellij.codeInsight.hints.presentation.PresentationFactory +import com.intellij.lang.Language import com.intellij.openapi.editor.Document import com.intellij.openapi.fileTypes.FileType import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement import com.intellij.psi.PsiFile import org.jetbrains.kotlin.idea.KotlinBundle +import org.jetbrains.kotlin.idea.KotlinLanguage import org.jetbrains.kotlin.idea.caches.resolve.safeAnalyzeNonSourceRootCode import org.jetbrains.kotlin.idea.parameterInfo.HintsTypeRenderer import org.jetbrains.kotlin.psi.* @@ -55,6 +57,8 @@ class KotlinCallChainHintsProvider : AbstractCallChainHintsProvider isAcceptedClassOrObject(element) diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinInlayHintsTopHitProvider.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinInlayHintsTopHitProvider.kt index 93aecece78a5..29062544b6a9 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinInlayHintsTopHitProvider.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinInlayHintsTopHitProvider.kt @@ -2,6 +2,7 @@ package org.jetbrains.kotlin.idea.codeInsight.hints import com.intellij.application.options.editor.CheckboxDescriptor +import com.intellij.codeInsight.hints.InlayHintsPassFactory import com.intellij.codeInsight.hints.settings.InlaySettingsProvider import com.intellij.ide.ui.OptionsSearchTopHitProvider import com.intellij.ide.ui.search.OptionDescription @@ -44,6 +45,7 @@ class KotlinInlayHintsTopHitProvider : OptionsSearchTopHitProvider.ProjectLevelP with(it) { isEnabled = newValue apply() + InlayHintsPassFactory.forceHintsUpdateOnNextPass() } }) ).asOptionDescriptor() @@ -59,6 +61,7 @@ class KotlinInlayHintsTopHitProvider : OptionsSearchTopHitProvider.ProjectLevelP it.isEnabled = true } it.apply() + InlayHintsPassFactory.forceHintsUpdateOnNextPass() }) ).asOptionDescriptor() } diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinLambdasHintsProvider.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinLambdasHintsProvider.kt index faa1c7f594ac..6377ff407163 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinLambdasHintsProvider.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinLambdasHintsProvider.kt @@ -16,7 +16,21 @@ class KotlinLambdasHintsProvider : KotlinAbstractHintsProvider returnExpressions + HintType.LAMBDA_IMPLICIT_PARAMETER_RECEIVER -> implicitReceiversAndParams + else -> false + } + + override fun enable(hintType: HintType, enable: Boolean) = + when(hintType) { + HintType.LAMBDA_RETURN_EXPRESSION -> returnExpressions = enable + HintType.LAMBDA_IMPLICIT_PARAMETER_RECEIVER -> implicitReceiversAndParams = enable + else -> Unit + } + } override val key: SettingsKey = SettingsKey("kotlin.lambdas.hints") override val name: String = KotlinBundle.message("hints.settings.lambdas") @@ -29,13 +43,15 @@ class KotlinLambdasHintsProvider : KotlinAbstractHintsProvider settings.returnExpressions HintType.LAMBDA_IMPLICIT_PARAMETER_RECEIVER -> settings.implicitReceiversAndParams else -> false } - } + + override fun isHintSupported(hintType: HintType): Boolean = + hintType == HintType.LAMBDA_RETURN_EXPRESSION || hintType == HintType.LAMBDA_IMPLICIT_PARAMETER_RECEIVER override fun createConfigurable(settings: Settings): ImmediateConfigurable { return object : ImmediateConfigurable { diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinReferencesTypeHintsProvider.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinReferencesTypeHintsProvider.kt index 8f193f52ff63..debdc2f11fa8 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinReferencesTypeHintsProvider.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinReferencesTypeHintsProvider.kt @@ -18,7 +18,25 @@ class KotlinReferencesTypeHintsProvider : KotlinAbstractHintsProvider propertyType + HintType.LOCAL_VARIABLE_HINT -> localVariableType + HintType.FUNCTION_HINT -> functionReturnType + HintType.PARAMETER_TYPE_HINT -> parameterType + else -> false + } + + override fun enable(hintType: HintType, enable: Boolean) = + when(hintType) { + HintType.PROPERTY_HINT -> propertyType = enable + HintType.LOCAL_VARIABLE_HINT -> localVariableType = enable + HintType.FUNCTION_HINT -> functionReturnType = enable + HintType.PARAMETER_TYPE_HINT -> parameterType = enable + else -> Unit + } + } override val key: SettingsKey = SettingsKey("kotlin.references.types.hints") override val name: String = KotlinBundle.message("hints.settings.types") @@ -76,6 +94,10 @@ class KotlinReferencesTypeHintsProvider : KotlinAbstractHintsProvider num % 2 == 0 } diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinValuesHintsProvider.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinValuesHintsProvider.kt index 1b639caea1ec..1402a1f34078 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinValuesHintsProvider.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/KotlinValuesHintsProvider.kt @@ -11,7 +11,19 @@ class KotlinValuesHintsProvider : KotlinAbstractHintsProvider ranges + else -> false + } + + override fun enable(hintType: HintType, enable: Boolean) = + when (hintType) { + HintType.RANGES -> ranges = enable + else -> Unit + } + } override val key: SettingsKey = SettingsKey("kotlin.values.hints") override val name: String = KotlinBundle.message("hints.settings.values.ranges") @@ -37,12 +49,13 @@ class KotlinValuesHintsProvider : KotlinAbstractHintsProvider settings.ranges else -> false } - } + + override fun isHintSupported(hintType: HintType): Boolean = hintType == HintType.RANGES override val previewText: String? = null diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 5e8d1d6ddf5b..67bd07a31d09 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -10980,6 +10980,24 @@ public abstract class IntentionTestGenerated extends AbstractIntentionTest { } } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("testData/intentions/inlayHints") + public static class InlayHints extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("testData/intentions/inlayHints/localVariable.kt"); + } + + @TestMetadata("property.kt") + public void testProperty() throws Exception { + runTest("testData/intentions/inlayHints/property.kt"); + } + } + @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/intentions/insertCurlyBracesToTemplate") public static class InsertCurlyBracesToTemplate extends AbstractIntentionTest { diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiFileTest.kt b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiFileTest.kt index ac9a88f1073b..674835e05415 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiFileTest.kt +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiFileTest.kt @@ -111,7 +111,8 @@ abstract class AbstractQuickFixMultiFileTest : KotlinLightCodeInsightFixtureTest } private fun doMultiFileTest(beforeFileName: String) { - val multiFileText = FileUtil.loadFile(File(beforeFileName), true) + val mainFile = File(beforeFileName) + val multiFileText = FileUtil.loadFile(mainFile, true) val subFiles = TestFiles.createTestFiles( "single.kt", @@ -150,6 +151,7 @@ abstract class AbstractQuickFixMultiFileTest : KotlinLightCodeInsightFixtureTest } doAction( + mainFile, text, file, editor, @@ -177,7 +179,7 @@ abstract class AbstractQuickFixMultiFileTest : KotlinLightCodeInsightFixtureTest } actualTestFile.append("// FILE: ").append(afterFile.path).append("\n").append(afterText) - KotlinTestUtils.assertEqualsToFile(File(beforeFileName), actualTestFile.toString()) + KotlinTestUtils.assertEqualsToFile(mainFile, actualTestFile.toString()) } } else { TestCase.assertNull(".after file should not exist", afterFile) @@ -228,6 +230,7 @@ abstract class AbstractQuickFixMultiFileTest : KotlinLightCodeInsightFixtureTest } doAction( + mainFile, text, file, editor, @@ -281,7 +284,7 @@ abstract class AbstractQuickFixMultiFileTest : KotlinLightCodeInsightFixtureTest DirectiveBasedActionUtils.checkForUnexpectedErrors(file) } - protected open fun checkAvailableActionsAreExpected(file: PsiFile, actions: Collection) { + protected open fun checkAvailableActionsAreExpected(file: File, actions: Collection) { DirectiveBasedActionUtils.checkAvailableActionsAreExpected(file, availableActions) } @@ -313,6 +316,7 @@ abstract class AbstractQuickFixMultiFileTest : KotlinLightCodeInsightFixtureTest availableActions.firstOrNull { pattern.matcher(it.text).matches() } fun doAction( + mainFile: File, text: String, file: PsiFile, editor: Editor, @@ -321,7 +325,7 @@ abstract class AbstractQuickFixMultiFileTest : KotlinLightCodeInsightFixtureTest getAvailableActions: () -> List, doHighlighting: () -> List, shouldBeAvailableAfterExecution: Boolean = false, - checkAvailableActionsAreExpected: (PsiFile, Collection) -> Unit = + checkAvailableActionsAreExpected: (File, Collection) -> Unit = DirectiveBasedActionUtils::checkAvailableActionsAreExpected ) { val pattern = if (text.startsWith("/")) @@ -346,7 +350,7 @@ abstract class AbstractQuickFixMultiFileTest : KotlinLightCodeInsightFixtureTest StringUtil.join(infos, "\n") ) } else { - checkAvailableActionsAreExpected(file, availableActions) + checkAvailableActionsAreExpected(mainFile, availableActions) } } else { if (!actionShouldBeAvailable) { diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiModuleTest.kt b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiModuleTest.kt index a727c4fb2ac6..f96951011d79 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiModuleTest.kt +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixMultiModuleTest.kt @@ -8,6 +8,7 @@ import com.intellij.codeInsight.intention.IntentionAction import com.intellij.openapi.ui.Messages import com.intellij.openapi.ui.TestDialog import com.intellij.openapi.ui.TestDialogManager +import com.intellij.openapi.vfs.VirtualFile import com.intellij.testFramework.IdeaTestUtil import com.intellij.testFramework.UsefulTestCase import junit.framework.ComparisonFailure @@ -44,9 +45,23 @@ abstract class AbstractQuickFixMultiModuleTest : AbstractMultiModuleTest(), Quic } } + private fun VirtualFile.toIOFile(): File? { + val paths = mutableListOf() + var vFile: VirtualFile? = this + while (vFile != null) { + vFile.sourceIOFile()?.let { + return File(it, paths.reversed().joinToString("/")) + } + paths.add(vFile.name) + vFile = vFile.parent + } + return null + } + private fun doQuickFixTest(dirPath: String) { val actionFile = project.findFileWithCaret() val virtualFile = actionFile.virtualFile!! + val mainFile = virtualFile.toIOFile()?.takeIf(File::exists) ?: error("unable to lookup source io file") configureByExistingFile(virtualFile) val actionFileText = actionFile.text val actionFileName = actionFile.name @@ -79,6 +94,7 @@ abstract class AbstractQuickFixMultiModuleTest : AbstractMultiModuleTest(), Quic val log = try { AbstractQuickFixMultiFileTest.doAction( + mainFile, text, file, editor, diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/stubs/AbstractMultiModuleTest.kt b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/stubs/AbstractMultiModuleTest.kt index e32e5471a613..038161e0922e 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/stubs/AbstractMultiModuleTest.kt +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/stubs/AbstractMultiModuleTest.kt @@ -15,9 +15,11 @@ import com.intellij.openapi.roots.DependencyScope import com.intellij.openapi.roots.ModuleRootModificationUtil import com.intellij.openapi.roots.OrderRootType import com.intellij.openapi.roots.libraries.PersistentLibraryKind +import com.intellij.openapi.util.Key import com.intellij.openapi.util.Ref import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.vfs.LocalFileSystem +import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi.PsiFile import com.intellij.testFramework.IdeaTestUtil import com.intellij.testFramework.PsiTestUtil @@ -84,6 +86,8 @@ abstract class AbstractMultiModuleTest : DaemonAnalyzerTestCase() { return super.createModule(path, moduleType) } + fun VirtualFile.sourceIOFile(): File? = getUserData(sourceIOFile) + fun addRoot(module: Module, sourceDirInTestData: File, isTestRoot: Boolean, transformContainedFiles: ((File) -> Unit)? = null) { val tmpDir = createTempDirectory() @@ -97,6 +101,7 @@ abstract class AbstractMultiModuleTest : DaemonAnalyzerTestCase() { } val virtualTempDir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(tmpRootDir)!! + virtualTempDir.putUserData(sourceIOFile, sourceDirInTestData) virtualTempDir.refresh(false, isTestRoot) PsiTestUtil.addSourceRoot(module, virtualTempDir, isTestRoot) } @@ -179,6 +184,8 @@ abstract class AbstractMultiModuleTest : DaemonAnalyzerTestCase() { } } +private val sourceIOFile: Key = Key("sourceIOFile") + fun Module.createFacet( platformKind: TargetPlatform? = null, useProjectSettings: Boolean = true diff --git a/plugins/kotlin/idea/tests/testData/intentions/inlayHints/.intention b/plugins/kotlin/idea/tests/testData/intentions/inlayHints/.intention new file mode 100644 index 000000000000..0d88aa1a9d90 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/intentions/inlayHints/.intention @@ -0,0 +1 @@ +org.jetbrains.kotlin.idea.codeInsight.hints.EnableKotlinTypeHintsOption \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/intentions/inlayHints/localVariable.kt b/plugins/kotlin/idea/tests/testData/intentions/inlayHints/localVariable.kt new file mode 100644 index 000000000000..ac506c33f7a5 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/intentions/inlayHints/localVariable.kt @@ -0,0 +1,6 @@ +// IS_APPLICABLE: true +// AFTER-WARNING: Variable 'q' is never used +fun foo() { + val s = "" + val q = s +} \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/intentions/inlayHints/localVariable.kt.after b/plugins/kotlin/idea/tests/testData/intentions/inlayHints/localVariable.kt.after new file mode 100644 index 000000000000..ac506c33f7a5 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/intentions/inlayHints/localVariable.kt.after @@ -0,0 +1,6 @@ +// IS_APPLICABLE: true +// AFTER-WARNING: Variable 'q' is never used +fun foo() { + val s = "" + val q = s +} \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/intentions/inlayHints/property.kt b/plugins/kotlin/idea/tests/testData/intentions/inlayHints/property.kt new file mode 100644 index 000000000000..dad83c52866a --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/intentions/inlayHints/property.kt @@ -0,0 +1,3 @@ +// IS_APPLICABLE: true +val s = "" +val q = s \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/intentions/inlayHints/property.kt.after b/plugins/kotlin/idea/tests/testData/intentions/inlayHints/property.kt.after new file mode 100644 index 000000000000..dad83c52866a --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/intentions/inlayHints/property.kt.after @@ -0,0 +1,3 @@ +// IS_APPLICABLE: true +val s = "" +val q = s \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/addThrowAnnotation/js/js_dep(stdlib)/js.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/addThrowAnnotation/js/js_dep(stdlib)/js.kt index 0519fe8764ae..61169fcb7055 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/addThrowAnnotation/js/js_dep(stdlib)/js.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/addThrowAnnotation/js/js_dep(stdlib)/js.kt @@ -1,4 +1,5 @@ // "Add '@Throws' annotation" "false" +// ACTION: Do not show return expression hints fun test() { throw Throwable() diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/addThrowAnnotation/jvmWithoutStdlib/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/addThrowAnnotation/jvmWithoutStdlib/jvm/jvm.kt index 0519fe8764ae..61169fcb7055 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/addThrowAnnotation/jvmWithoutStdlib/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/addThrowAnnotation/jvmWithoutStdlib/jvm/jvm.kt @@ -1,4 +1,5 @@ // "Add '@Throws' annotation" "false" +// ACTION: Do not show return expression hints fun test() { throw Throwable() diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/createExpect/noAccessOnMember/jvm/My.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/createExpect/noAccessOnMember/jvm/My.kt index cd2fa1ee1cc8..63cb3302e76e 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/createExpect/noAccessOnMember/jvm/My.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/createExpect/noAccessOnMember/jvm/My.kt @@ -3,6 +3,7 @@ // ACTION: Convert member to extension // ACTION: Convert to block body // ACTION: Create expected class in common module testModule_Common +// ACTION: Do not show return expression hints // ACTION: Move to companion object // ACTION: Remove 'actual' modifier // ACTION: Remove explicit type specification diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/createExpect/typeAlias/jvm/My.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/createExpect/typeAlias/jvm/My.kt index 64e2cf3c3eb7..e6e66d7d5735 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/createExpect/typeAlias/jvm/My.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/createExpect/typeAlias/jvm/My.kt @@ -1,6 +1,7 @@ // "Create expected class in common module testModule_Common" "false" // DISABLE-ERRORS // ACTION: Apply all 'Remove modifier' fixes in file +// ACTION: Do not show return expression hints // ACTION: Remove 'actual' modifier class Some(val x: Int, val y: Int) { diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException2/native/test.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException2/native/test.kt index ed46ddbb5659..165e9d724d25 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException2/native/test.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException2/native/test.kt @@ -1,5 +1,6 @@ // "Add 'CancellationException::class'" "false" // ERROR: @Throws on suspend declaration must have CancellationException (or any of its superclasses) listed +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException3/native/test.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException3/native/test.kt index 27675224430f..af7d51f1c359 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException3/native/test.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException3/native/test.kt @@ -1,5 +1,6 @@ // "Add 'CancellationException::class'" "false" // ERROR: @Throws must have non-empty class list +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ACTION: Remove annotation diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException4/native/test.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException4/native/test.kt index dc55047ad2b8..4ba277b4bacc 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException4/native/test.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException4/native/test.kt @@ -1,5 +1,6 @@ // "Add 'CancellationException::class'" "false" // ERROR: @Throws must have non-empty class list +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ACTION: Remove annotation diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notInitializeNonActualParameterWithConstructorParameter/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notInitializeNonActualParameterWithConstructorParameter/jvm/jvm.kt index 93e0b963a397..02843a651376 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notInitializeNonActualParameterWithConstructorParameter/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notInitializeNonActualParameterWithConstructorParameter/jvm/jvm.kt @@ -4,6 +4,7 @@ // ACTION: Apply all 'Add modifier' fixes in file // ACTION: Convert member to extension // ACTION: Convert property to function +// ACTION: Do not show return expression hints // ACTION: Introduce backing property // ACTION: Make 'b' 'abstract' // ACTION: Move to companion object diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notInitializeWithConstructorParameter/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notInitializeWithConstructorParameter/jvm/jvm.kt index 7881382af413..6e0040e9d1d8 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notInitializeWithConstructorParameter/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notInitializeWithConstructorParameter/jvm/jvm.kt @@ -4,6 +4,7 @@ // ACTION: Apply all 'Add modifier' fixes in file // ACTION: Convert member to extension // ACTION: Convert property to function +// ACTION: Do not show return expression hints // ACTION: Introduce backing property // ACTION: Make 'b' 'abstract' // ACTION: Move to companion object diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notMoveNonActualParamterToActualConstructor/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notMoveNonActualParamterToActualConstructor/jvm/jvm.kt index da0a11c33139..cdc9081b4223 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notMoveNonActualParamterToActualConstructor/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notMoveNonActualParamterToActualConstructor/jvm/jvm.kt @@ -4,6 +4,7 @@ // ACTION: Apply all 'Add modifier' fixes in file // ACTION: Convert member to extension // ACTION: Convert property to function +// ACTION: Do not show return expression hints // ACTION: Introduce backing property // ACTION: Make 'b' 'abstract' // ACTION: Move to companion object diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notMoveToActualConstructor/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notMoveToActualConstructor/jvm/jvm.kt index 69ebff02644c..f12ce422d842 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notMoveToActualConstructor/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/initializeProperty/notMoveToActualConstructor/jvm/jvm.kt @@ -4,6 +4,7 @@ // ACTION: Apply all 'Add modifier' fixes in file // ACTION: Convert member to extension // ACTION: Convert property to function +// ACTION: Do not show return expression hints // ACTION: Introduce backing property // ACTION: Make 'b' 'abstract' // ACTION: Move to companion object diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/actualNoImplementAsConstructorParam/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/actualNoImplementAsConstructorParam/jvm/jvm.kt index a70bfdd6d900..384f942be36e 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/actualNoImplementAsConstructorParam/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/actualNoImplementAsConstructorParam/jvm/jvm.kt @@ -2,6 +2,7 @@ // ERROR: Class 'End' is not abstract and does not implement abstract member public abstract val a: Int defined in IFoo // ACTION: Apply all 'Add modifier' fixes in file // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Implement members // ACTION: Make 'End' 'abstract' // ACTION: Rename file to End.kt diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/addActualToClass/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/addActualToClass/jvm/jvm.kt index 2337275946b9..db3da7a62e5a 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/addActualToClass/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/addActualToClass/jvm/jvm.kt @@ -1,5 +1,6 @@ // "Add 'actual' modifier" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Rename file to Foo.kt // KTIJ-19789 No diagnostic "actual is missing" on top-level class/function/property in IDE diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/addActualToTopLevelMember/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/addActualToTopLevelMember/jvm/jvm.kt index 672a43d49495..b105eb53972f 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/addActualToTopLevelMember/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/addActualToTopLevelMember/jvm/jvm.kt @@ -1,5 +1,6 @@ // "Add 'actual' modifier" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // KTIJ-19789 No diagnostic "actual is missing" on top-level class/function/property in IDE diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertPropertyGetterToInitializer/header/header.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertPropertyGetterToInitializer/header/header.kt index 89432bb25231..9c5b5fa06480 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertPropertyGetterToInitializer/header/header.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/convertPropertyGetterToInitializer/header/header.kt @@ -1,6 +1,7 @@ // "Convert property getter to initializer" "false" // ERROR: Expected declaration must not have a body // ACTION: Convert to block body +// ACTION: Do not show return expression hints expect class C { val p: Int get() = 1 diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/createTestOnExpect/header/header.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/createTestOnExpect/header/header.kt index 88cbd58a3cf5..3220459a76c1 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/createTestOnExpect/header/header.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/createTestOnExpect/header/header.kt @@ -1,3 +1,4 @@ // "Create test" "false" +// ACTION: Do not show return expression hints // ACTION: Rename file to Foo.kt expect class Foo diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/importExpectClassWithoutActualInJvm/jvm/b.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/importExpectClassWithoutActualInJvm/jvm/b.kt index e437490a3bbb..590025fe30e0 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/importExpectClassWithoutActualInJvm/jvm/b.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/importExpectClassWithoutActualInJvm/jvm/b.kt @@ -4,6 +4,7 @@ // ACTION: Create enum 'Foo' // ACTION: Create interface 'Foo' // ACTION: Create type parameter 'Foo' in function 'use' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ERROR: Unresolved reference: Foo package bar diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/memberValToExtensionByHeaderWithInapplicableImpl/header/header.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/memberValToExtensionByHeaderWithInapplicableImpl/header/header.kt index 6dfcf73cb9d9..c1769ad573e1 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/memberValToExtensionByHeaderWithInapplicableImpl/header/header.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/memberValToExtensionByHeaderWithInapplicableImpl/header/header.kt @@ -1,5 +1,6 @@ // "Convert member to extension" "false" // ACTION: Convert property to function +// ACTION: Do not show return expression hints // ACTION: Move to companion object expect class Foo { diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/safeDeleteForbiddenFromActual/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/safeDeleteForbiddenFromActual/jvm/jvm.kt index 6c370b925bef..147cbbcba914 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/safeDeleteForbiddenFromActual/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/safeDeleteForbiddenFromActual/jvm/jvm.kt @@ -1,6 +1,7 @@ // "Safe delete 'foo'" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection // ACTION: Convert member to extension +// ACTION: Do not show return expression hints // ACTION: Move to companion object actual class My { diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/safeDeleteUsedInAnotherPlatform/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/safeDeleteUsedInAnotherPlatform/jvm/jvm.kt index 6c370b925bef..147cbbcba914 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/safeDeleteUsedInAnotherPlatform/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/other/safeDeleteUsedInAnotherPlatform/jvm/jvm.kt @@ -1,6 +1,7 @@ // "Safe delete 'foo'" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection // ACTION: Convert member to extension +// ACTION: Do not show return expression hints // ACTION: Move to companion object actual class My { diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualMethod/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualMethod/jvm/jvm.kt index a5150f9c12f4..a4b3319693d9 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualMethod/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualMethod/jvm/jvm.kt @@ -1,6 +1,7 @@ // "Make not-nullable" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.RedundantNullableReturnTypeInspection // ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification actual class MyClass { diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualTopLevelFunction/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualTopLevelFunction/jvm/jvm.kt index 24f2a3ba0029..68514ce9d2b7 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualTopLevelFunction/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualTopLevelFunction/jvm/jvm.kt @@ -1,6 +1,7 @@ // "Make not-nullable" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.RedundantNullableReturnTypeInspection // ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification actual fun runAction(block: () -> Unit): Any? = block() \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualTopLevelProperty/jvm/jvm.kt b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualTopLevelProperty/jvm/jvm.kt index c3050eb847ef..46bbd36defc2 100644 --- a/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualTopLevelProperty/jvm/jvm.kt +++ b/plugins/kotlin/idea/tests/testData/multiModuleQuickFix/redundantNullableReturnType/actualTopLevelProperty/jvm/jvm.kt @@ -2,6 +2,7 @@ // TOOL: org.jetbrains.kotlin.idea.inspections.RedundantNullableReturnTypeInspection // ACTION: Convert property initializer to getter // ACTION: Convert to lazy property +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification actual val prop: Any? = 42 \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/abstract/makeInlineClassAbstract.kt b/plugins/kotlin/idea/tests/testData/quickfix/abstract/makeInlineClassAbstract.kt index d3f030acb78a..dcd34598d1a7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/abstract/makeInlineClassAbstract.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/abstract/makeInlineClassAbstract.kt @@ -2,8 +2,9 @@ // ERROR: Class 'A' is not abstract and does not implement abstract member public abstract fun foo(): String defined in I // ERROR: Primary constructor is required for value class // ACTION: Create test -// ACTION: Implement members +// ACTION: Do not show return expression hints // ACTION: Extract 'A' from current file +// ACTION: Implement members // ACTION: Rename file to A.kt interface I { fun foo(): String diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_member_with_delegate.kt b/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_member_with_delegate.kt index d4f0c080654b..1ea750f4d65a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_member_with_delegate.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_member_with_delegate.kt @@ -1,6 +1,7 @@ // "Add annotation target" "false" // WITH_STDLIB // ACTION: Convert to ordinary property +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make internal // ACTION: Make private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_with_delegate.kt b/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_with_delegate.kt index 4876a9ed49e2..895f13f506c7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_with_delegate.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_with_delegate.kt @@ -1,6 +1,7 @@ // "Add annotation target" "false" // WITH_STDLIB // ACTION: Convert to ordinary property +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make internal // ACTION: Make private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/abstract.kt b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/abstract.kt index 77a97ccf5f86..b62a5161e130 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/abstract.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/abstract.kt @@ -3,6 +3,7 @@ // ACTION: Create extension function 'Foo.component2' // ACTION: Create member function 'Foo.component1' // ACTION: Create member function 'Foo.component2' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Put arguments on separate lines // ERROR: Cannot create an instance of an abstract class diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/inner.kt b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/inner.kt index 6f83810dcf9e..3f73da2abc25 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/inner.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/inner.kt @@ -3,6 +3,7 @@ // ACTION: Create extension function 'Test.Foo.component2' // ACTION: Create member function 'Test.Foo.component1' // ACTION: Create member function 'Test.Foo.component2' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Put arguments on separate lines // ERROR: Destructuring declaration initializer of type Test.Foo must have a 'component1()' function diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/invisibleParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/invisibleParameter.kt index d3d4069c8782..9bda67764965 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/invisibleParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/invisibleParameter.kt @@ -3,6 +3,7 @@ // ACTION: Create extension function 'Foo.component2' // ACTION: Create member function 'Foo.component1' // ACTION: Create member function 'Foo.component2' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Put arguments on separate lines // ERROR: Destructuring declaration initializer of type Foo must have a 'component1()' function diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/invisibleParameter2.kt b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/invisibleParameter2.kt index ae1be211bb39..4becc239ec22 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/invisibleParameter2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/invisibleParameter2.kt @@ -3,6 +3,7 @@ // ACTION: Create extension function 'Foo.component2' // ACTION: Create member function 'Foo.component1' // ACTION: Create member function 'Foo.component2' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Put arguments on separate lines // ERROR: Destructuring declaration initializer of type Foo must have a 'component1()' function diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/noParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/noParameter.kt index 49f2dab27dea..7847b32f71bd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/noParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/noParameter.kt @@ -3,6 +3,7 @@ // ACTION: Create extension function 'Foo.component2' // ACTION: Create member function 'Foo.component1' // ACTION: Create member function 'Foo.component2' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ERROR: Destructuring declaration initializer of type Foo must have a 'component1()' function // ERROR: Destructuring declaration initializer of type Foo must have a 'component2()' function diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/notVarVal.kt b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/notVarVal.kt index 8ddfa07e1dee..81abdc99056c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/notVarVal.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/notVarVal.kt @@ -3,6 +3,7 @@ // ACTION: Create extension function 'Foo.component2' // ACTION: Create member function 'Foo.component1' // ACTION: Create member function 'Foo.component2' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Put arguments on separate lines // ERROR: Destructuring declaration initializer of type Foo must have a 'component1()' function diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/open.kt b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/open.kt index d1d29c6121b3..6126a5805be0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/open.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/open.kt @@ -3,6 +3,7 @@ // ACTION: Create extension function 'Foo.component2' // ACTION: Create member function 'Foo.component1' // ACTION: Create member function 'Foo.component2' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Put arguments on separate lines // ERROR: Destructuring declaration initializer of type Foo must have a 'component1()' function diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/sealed.kt b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/sealed.kt index 5e413353fb71..5e92d0f049b9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/sealed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/sealed.kt @@ -3,6 +3,7 @@ // ACTION: Create extension function 'Foo.component2' // ACTION: Create member function 'Foo.component1' // ACTION: Create member function 'Foo.component2' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Put arguments on separate lines // ERROR: Cannot access '': it is protected in 'Foo' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/vararg.kt b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/vararg.kt index f50d8da0bc44..58dc11a86461 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/vararg.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addDataModifier/vararg.kt @@ -3,6 +3,7 @@ // ACTION: Create extension function 'Foo.component2' // ACTION: Create member function 'Foo.component1' // ACTION: Create member function 'Foo.component2' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Put arguments on separate lines // ERROR: Destructuring declaration initializer of type Foo must have a 'component1()' function diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addDefaultConstructor/expectAnnotation3.kt b/plugins/kotlin/idea/tests/testData/quickfix/addDefaultConstructor/expectAnnotation3.kt index c3f25dace593..4c5170068294 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addDefaultConstructor/expectAnnotation3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addDefaultConstructor/expectAnnotation3.kt @@ -1,5 +1,6 @@ // "Add default constructor to expect class" "false" // ENABLE_MULTIPLATFORM +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ACTION: Remove constructor call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addEqEqTrue/notBoolean.kt b/plugins/kotlin/idea/tests/testData/quickfix/addEqEqTrue/notBoolean.kt index 4fef121f70b9..5bdfe13e1c5d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addEqEqTrue/notBoolean.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addEqEqTrue/notBoolean.kt @@ -1,4 +1,5 @@ // "Add '== true'" "false" +// ACTION: Do not show return expression hints // DISABLE-ERRORS class Foo { fun bar() = "" diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/iterableWithBadIterator.kt b/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/iterableWithBadIterator.kt index 23187cbaec26..8ddf2f0139e2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/iterableWithBadIterator.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/iterableWithBadIterator.kt @@ -1,4 +1,5 @@ // "Add non-null asserted (!!) call" "false" +// ACTION: Do not show return expression hints // ACTION: Replace with a 'forEach' function call // ACTION: Surround with null check // ERROR: Not nullable value required to call an 'iterator()' method on for-loop range diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/nullInitializer.kt b/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/nullInitializer.kt index 31c0a91b35c1..fc86ed7539f3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/nullInitializer.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/nullInitializer.kt @@ -1,6 +1,7 @@ // "Add non-null asserted (!!) call" "false" // ACTION: Add 'toString()' call // ACTION: Change type of 'x' to 'String?' +// ACTION: Do not show return expression hints // ERROR: Type mismatch: inferred type is String? but String was expected fun foo(arg: String?) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/typeMismatch/smartcastImpossibleForReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/typeMismatch/smartcastImpossibleForReceiver.kt index d35929fdd0de..1b2ac7172a72 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/typeMismatch/smartcastImpossibleForReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/typeMismatch/smartcastImpossibleForReceiver.kt @@ -2,6 +2,7 @@ // ACTION: Add non-null asserted (!!) call // ACTION: Convert to run // ACTION: Convert to with +// ACTION: Do not show return expression hints // ACTION: Remove braces from 'if' statement // ACTION: Replace 'if' expression with safe access expression diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/typeMismatch/smartcastImpossibleForReceiver.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/typeMismatch/smartcastImpossibleForReceiver.kt.after index 467769193a32..8c84ea3ee23b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/typeMismatch/smartcastImpossibleForReceiver.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/addExclExclCall/typeMismatch/smartcastImpossibleForReceiver.kt.after @@ -2,6 +2,7 @@ // ACTION: Add non-null asserted (!!) call // ACTION: Convert to run // ACTION: Convert to with +// ACTION: Do not show return expression hints // ACTION: Remove braces from 'if' statement // ACTION: Replace 'if' expression with safe access expression diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/localVar.kt b/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/localVar.kt index 69a52a048071..38f9c1ea9c66 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/localVar.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/localVar.kt @@ -1,4 +1,5 @@ // "Add initializer" "false" +// ACTION: Do not show return expression hints fun test() { val n: Int } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelExtensionProperty.kt b/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelExtensionProperty.kt index 6888379feb99..44e2f4a61c9a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelExtensionProperty.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelExtensionProperty.kt @@ -1,5 +1,6 @@ // "Add initializer" "false" // ACTION: Add getter +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ERROR: Extension property must have accessors or be abstract diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelExtensionPropertySetterOnly.kt b/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelExtensionPropertySetterOnly.kt index 6888379feb99..44e2f4a61c9a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelExtensionPropertySetterOnly.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelExtensionPropertySetterOnly.kt @@ -1,5 +1,6 @@ // "Add initializer" "false" // ACTION: Add getter +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ERROR: Extension property must have accessors or be abstract diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelPropertyWithDelegateRuntime.kt b/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelPropertyWithDelegateRuntime.kt index 2054bda6a368..1d628799a1be 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelPropertyWithDelegateRuntime.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelPropertyWithDelegateRuntime.kt @@ -2,6 +2,7 @@ // WITH_STDLIB // ACTION: Convert to ordinary property // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private val n: Int by lazy { 0 } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelPropertyWithGetter.kt b/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelPropertyWithGetter.kt index f65e301f4746..efdca4349583 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelPropertyWithGetter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addInitializer/topLevelPropertyWithGetter.kt @@ -1,5 +1,6 @@ // "Add initializer" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ACTION: Remove explicit type specification diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/notSubtype.kt b/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/notSubtype.kt index edd80f62bac8..1a48bc87c985 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/notSubtype.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/notSubtype.kt @@ -1,6 +1,7 @@ // "Add 'return' before the expression" "false" // ERROR: A 'return' expression required in a function with a block body ('{...}') // ACTION: Compiler warning 'UNUSED_EXPRESSION' options +// ACTION: Do not show return expression hints // ACTION: Introduce local variable fun test(): Boolean { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/nothing.kt b/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/nothing.kt index 83da2c88d018..9e2157100b21 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/nothing.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/nothing.kt @@ -1,4 +1,5 @@ // "Add 'return' before the expression" "false" +// ACTION: Do not show return expression hints fun test(): Nothing { throw Throwable("Error") diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/typeError.kt b/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/typeError.kt index e58985b93310..cddf2d0aa431 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/typeError.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/typeError.kt @@ -2,6 +2,7 @@ // WITH_STDLIB // ACTION: Add full qualifier // ACTION: Compiler warning 'UNUSED_EXPRESSION' options +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Introduce local variable // ERROR: A 'return' expression required in a function with a block body ('{...}') diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/typeError2.kt b/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/typeError2.kt index 40d2189148d7..a51ed3b77510 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/typeError2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addReturnToUnusedLastExpressionInFunction/typeError2.kt @@ -1,14 +1,15 @@ // "Add 'return' before the expression" "false" // WITH_STDLIB // ACTION: Compiler warning 'UNUSED_EXPRESSION' options -// ACTION: Create local variable 'FunctionReference' -// ACTION: Create object 'FunctionReference' -// ACTION: Create parameter 'FunctionReference' -// ACTION: Create property 'FunctionReference' // ACTION: Create annotation 'FunctionReference' // ACTION: Create class 'FunctionReference' // ACTION: Create enum 'FunctionReference' // ACTION: Create interface 'FunctionReference' +// ACTION: Create local variable 'FunctionReference' +// ACTION: Create object 'FunctionReference' +// ACTION: Create parameter 'FunctionReference' +// ACTION: Create property 'FunctionReference' +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: Rename reference // ERROR: Unresolved reference: FunctionReference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/extensionReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/extensionReceiver.kt index 701041b60878..1e4f272c3dc6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/extensionReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/extensionReceiver.kt @@ -1,5 +1,6 @@ // "Change type arguments to <*>" "false" // ACTION: Compiler warning 'UNCHECKED_CAST' options +// ACTION: Do not show return expression hints fun test(a: Any) { (a as List).bar() } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/extensionReceiver2.kt b/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/extensionReceiver2.kt index bc0c840f6863..ffc4508246ef 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/extensionReceiver2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/extensionReceiver2.kt @@ -1,5 +1,6 @@ // "Change type arguments to <*, *>" "false" // ACTION: Compiler warning 'UNCHECKED_CAST' options +// ACTION: Do not show return expression hints fun test(a: Any) { (a as Map).bar() } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/genericTypeParameter2.kt b/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/genericTypeParameter2.kt index 796e6bf83611..88fc3aa79943 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/genericTypeParameter2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/genericTypeParameter2.kt @@ -1,5 +1,6 @@ // "Change type arguments to <*>" "false" // ACTION: Compiler warning 'UNCHECKED_CAST' options +// ACTION: Do not show return expression hints fun test(list: List<*>): List { return list as List } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/genericTypeParameter5.kt b/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/genericTypeParameter5.kt index 3bf5a2821eb8..50837a4eddfb 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/genericTypeParameter5.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addStarProjections/cast/genericTypeParameter5.kt @@ -1,5 +1,6 @@ // "Change type arguments to <*>" "false" // ACTION: Compiler warning 'UNCHECKED_CAST' options +// ACTION: Do not show return expression hints fun test(list: List<*>) { val a: List = list as List } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentNameProperty.kt b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentNameProperty.kt index 8529b5ee72aa..a7d9172136a7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentNameProperty.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentNameProperty.kt @@ -1,5 +1,6 @@ // "Assign to property" "false" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ERROR: Val cannot be reassigned class Test { var bar = 1 diff --git a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentNameProperty2.kt b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentNameProperty2.kt index 14d5a6d347c3..87120db1f2fd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentNameProperty2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentNameProperty2.kt @@ -1,5 +1,6 @@ // "Assign to property" "false" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ERROR: Val cannot be reassigned class Test(var bar: Int) { fun test(foo: Int) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentTypeProperty.kt b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentTypeProperty.kt index 8cbb95590901..5d47a4905747 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentTypeProperty.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentTypeProperty.kt @@ -1,5 +1,6 @@ // "Assign to property" "false" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ERROR: Val cannot be reassigned class Test { var foo = "1" diff --git a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentTypeProperty2.kt b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentTypeProperty2.kt index 863411d180ae..a729ea208262 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentTypeProperty2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/differentTypeProperty2.kt @@ -1,5 +1,6 @@ // "Assign to property" "false" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ERROR: Val cannot be reassigned class Test(var foo: String) { fun test(foo: Int) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/noProperty.kt b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/noProperty.kt index 6efe77a0a761..e0d314e36f24 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/noProperty.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/noProperty.kt @@ -1,5 +1,6 @@ // "Assign to property" "false" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ERROR: Val cannot be reassigned class Test(foo: Int) { fun test(foo: Int) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/valProperty.kt b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/valProperty.kt index 499a393fa24d..28e7f4183350 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/valProperty.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/valProperty.kt @@ -1,5 +1,6 @@ // "Assign to property" "false" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ERROR: Val cannot be reassigned class Test { val foo = 1 diff --git a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/valProperty2.kt b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/valProperty2.kt index 1038a57a15b1..2c5623f73c33 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/valProperty2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/assignToProperty/valProperty2.kt @@ -1,5 +1,6 @@ // "Assign to property" "false" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ERROR: Val cannot be reassigned class Test(val foo: Int) { fun test(foo: Int) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/builtInFunction.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/builtInFunction.kt index 1509501421d6..0259920c9f78 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/builtInFunction.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/builtInFunction.kt @@ -1,6 +1,7 @@ // "Import" "false" // WITH_STDLIB // ACTION: Create extension function 'List.maxByOrNull' +// ACTION: Do not show return expression hints // ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public inline fun > Array.maxByOrNull(selector: (TypeVariable(T)) -> TypeVariable(R)): TypeVariable(T)? defined in kotlin.collections
public inline fun > BooleanArray.maxByOrNull(selector: (Boolean) -> TypeVariable(R)): Boolean? defined in kotlin.collections
public inline fun > ByteArray.maxByOrNull(selector: (Byte) -> TypeVariable(R)): Byte? defined in kotlin.collections
public inline fun > CharArray.maxByOrNull(selector: (Char) -> TypeVariable(R)): Char? defined in kotlin.collections
public inline fun > CharSequence.maxByOrNull(selector: (Char) -> TypeVariable(R)): Char? defined in kotlin.text
public inline fun > DoubleArray.maxByOrNull(selector: (Double) -> TypeVariable(R)): Double? defined in kotlin.collections
public inline fun > FloatArray.maxByOrNull(selector: (Float) -> TypeVariable(R)): Float? defined in kotlin.collections
public inline fun > IntArray.maxByOrNull(selector: (Int) -> TypeVariable(R)): Int? defined in kotlin.collections
public inline fun > LongArray.maxByOrNull(selector: (Long) -> TypeVariable(R)): Long? defined in kotlin.collections
public inline fun > ShortArray.maxByOrNull(selector: (Short) -> TypeVariable(R)): Short? defined in kotlin.collections
public inline fun > UByteArray.maxByOrNull(selector: (UByte) -> TypeVariable(R)): UByte? defined in kotlin.collections
public inline fun > UIntArray.maxByOrNull(selector: (UInt) -> TypeVariable(R)): UInt? defined in kotlin.collections
public inline fun > ULongArray.maxByOrNull(selector: (ULong) -> TypeVariable(R)): ULong? defined in kotlin.collections
public inline fun > UShortArray.maxByOrNull(selector: (UShort) -> TypeVariable(R)): UShort? defined in kotlin.collections
public inline fun > Iterable.maxByOrNull(selector: (TypeVariable(T)) -> TypeVariable(R)): TypeVariable(T)? defined in kotlin.collections
public inline fun > Map.maxByOrNull(selector: (Map.Entry) -> TypeVariable(R)): Map.Entry? defined in kotlin.collections
public inline fun > Sequence.maxByOrNull(selector: (TypeVariable(T)) -> TypeVariable(R)): TypeVariable(T)? defined in kotlin.sequences // ERROR: Unresolved reference: it fun test(list: List) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/builtInFunctionAlreadyExists.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/builtInFunctionAlreadyExists.kt index a9ec08d51a7a..7521bb9a2a03 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/builtInFunctionAlreadyExists.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/builtInFunctionAlreadyExists.kt @@ -1,6 +1,7 @@ // "Import" "false" // WITH_STDLIB // ACTION: Create extension function 'List.maxByOrNull' +// ACTION: Do not show return expression hints // ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public inline fun > Array.maxByOrNull(selector: (TypeVariable(T)) -> TypeVariable(R)): TypeVariable(T)? defined in kotlin.collections
public inline fun > BooleanArray.maxByOrNull(selector: (Boolean) -> TypeVariable(R)): Boolean? defined in kotlin.collections
public inline fun > ByteArray.maxByOrNull(selector: (Byte) -> TypeVariable(R)): Byte? defined in kotlin.collections
public inline fun > CharArray.maxByOrNull(selector: (Char) -> TypeVariable(R)): Char? defined in kotlin.collections
public inline fun > DoubleArray.maxByOrNull(selector: (Double) -> TypeVariable(R)): Double? defined in kotlin.collections
public inline fun > FloatArray.maxByOrNull(selector: (Float) -> TypeVariable(R)): Float? defined in kotlin.collections
public inline fun > IntArray.maxByOrNull(selector: (Int) -> TypeVariable(R)): Int? defined in kotlin.collections
public inline fun > LongArray.maxByOrNull(selector: (Long) -> TypeVariable(R)): Long? defined in kotlin.collections
public inline fun > ShortArray.maxByOrNull(selector: (Short) -> TypeVariable(R)): Short? defined in kotlin.collections
public inline fun > UByteArray.maxByOrNull(selector: (UByte) -> TypeVariable(R)): UByte? defined in kotlin.collections
public inline fun > UIntArray.maxByOrNull(selector: (UInt) -> TypeVariable(R)): UInt? defined in kotlin.collections
public inline fun > ULongArray.maxByOrNull(selector: (ULong) -> TypeVariable(R)): ULong? defined in kotlin.collections
public inline fun > UShortArray.maxByOrNull(selector: (UShort) -> TypeVariable(R)): UShort? defined in kotlin.collections
public inline fun > Iterable.maxByOrNull(selector: (TypeVariable(T)) -> TypeVariable(R)): TypeVariable(T)? defined in kotlin.collections
public inline fun > Map.maxByOrNull(selector: (Map.Entry) -> TypeVariable(R)): Map.Entry? defined in kotlin.collections // ERROR: Unresolved reference: it import kotlin.collections.maxByOrNull diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportCompanionExtensionFunctionAsClassFunction.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportCompanionExtensionFunctionAsClassFunction.kt index 6eb5d9a23ec9..5ef84f0da58d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportCompanionExtensionFunctionAsClassFunction.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportCompanionExtensionFunctionAsClassFunction.kt @@ -2,6 +2,7 @@ // ACTION: Create extension function 'A.ext' // ACTION: Create function 'ext' // ACTION: Create member function 'A.ext' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: ext package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericClassSpecificTypeChild.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericClassSpecificTypeChild.kt index 2d9d6bb5be0b..255052ef833a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericClassSpecificTypeChild.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericClassSpecificTypeChild.kt @@ -1,4 +1,5 @@ // "Import" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: genericExt package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericExtensionFunctionTypeConstraintWrongReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericExtensionFunctionTypeConstraintWrongReceiver.kt index 9223c5bdecba..ce0711217b57 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericExtensionFunctionTypeConstraintWrongReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericExtensionFunctionTypeConstraintWrongReceiver.kt @@ -1,4 +1,5 @@ // "Import" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: ext package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericExtensionFunctionTypeConstraintWrongReceiver2.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericExtensionFunctionTypeConstraintWrongReceiver2.kt index 72341329bf0c..9aa585d4b31b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericExtensionFunctionTypeConstraintWrongReceiver2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportGenericExtensionFunctionTypeConstraintWrongReceiver2.kt @@ -2,6 +2,7 @@ // ACTION: Create extension function 'A.bar' // ACTION: Create function 'bar' // ACTION: Create member function 'A.bar' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: bar package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIntTypeExtensionFunctionVariableWrongReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIntTypeExtensionFunctionVariableWrongReceiver.kt index 4743043d04f8..14335420ce7b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIntTypeExtensionFunctionVariableWrongReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIntTypeExtensionFunctionVariableWrongReceiver.kt @@ -3,6 +3,7 @@ // ACTION: Convert to apply // ACTION: Convert to run // ACTION: Convert to with +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: ext diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIntTypeExtensionFunctionWrongReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIntTypeExtensionFunctionWrongReceiver.kt index 16d146fa0121..64df117d6fd4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIntTypeExtensionFunctionWrongReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIntTypeExtensionFunctionWrongReceiver.kt @@ -1,4 +1,5 @@ // "Import" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: ext package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions1.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions1.kt index 0b9e57257a4a..28fd46aeb76c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions1.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions1.kt @@ -3,6 +3,7 @@ // ACTION: Convert to with // ACTION: Create extension function 'Base.foo' // ACTION: Create member function 'Base.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions2.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions2.kt index f9c48fec0c0f..33ba0a83b13b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions2.kt @@ -3,6 +3,7 @@ // ACTION: Convert to with // ACTION: Create extension function 'Base.defaultFun' // ACTION: Create member function 'Base.defaultFun' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: defaultFun diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions3.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions3.kt index 104047db8284..b0ac76d96bf2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions3.kt @@ -2,6 +2,7 @@ // ACTION: Create extension function 'Base.foo' // ACTION: Create function 'foo' // ACTION: Create member function 'Base.foo' +// ACTION: Do not show return expression hints // ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public final fun Other.foo(): Unit defined in p.Base package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions4.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions4.kt index e9bcbad2be1c..4692661e046a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions4.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportIrrelevantFunctions4.kt @@ -2,6 +2,7 @@ // ACTION: Create extension function 'Base.defaultFun' // ACTION: Create function 'defaultFun' // ACTION: Create member function 'Base.defaultFun' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: defaultFun package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportThisExtensionReceiverWrongType.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportThisExtensionReceiverWrongType.kt index 22651d34ade9..fe43d2583350 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportThisExtensionReceiverWrongType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/callablesDeclaredInClasses/noImportThisExtensionReceiverWrongType.kt @@ -1,5 +1,6 @@ // "Import" "false" // ACTION: Create function 'ext' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: ext package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/delegateNoOperator.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/delegateNoOperator.test index 2e9b77f61e0c..d99c449aa374 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/delegateNoOperator.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/delegateNoOperator.test @@ -2,6 +2,7 @@ // "Import" "false" // ERROR: Type 'String' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate // ACTION: Convert to 'buildString' call +// ACTION: Do not show return expression hints // ACTION: To raw string literal package b diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedCoroutineImpl.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedCoroutineImpl.kt index 944379a76090..61da576e118c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedCoroutineImpl.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedCoroutineImpl.kt @@ -2,15 +2,16 @@ // WITH_STDLIB // LANGUAGE_VERSION: 1.2 // ACTION: Compiler warning 'UNUSED_EXPRESSION' options -// ACTION: Create local variable 'CoroutineImpl' -// ACTION: Create object 'CoroutineImpl' -// ACTION: Create parameter 'CoroutineImpl' -// ACTION: Create property 'CoroutineImpl' -// ACTION: Introduce local variable // ACTION: Create annotation 'CoroutineImpl' // ACTION: Create class 'CoroutineImpl' // ACTION: Create enum 'CoroutineImpl' // ACTION: Create interface 'CoroutineImpl' +// ACTION: Create local variable 'CoroutineImpl' +// ACTION: Create object 'CoroutineImpl' +// ACTION: Create parameter 'CoroutineImpl' +// ACTION: Create property 'CoroutineImpl' +// ACTION: Do not show return expression hints +// ACTION: Introduce local variable // ACTION: Rename reference // ERROR: Unresolved reference: CoroutineImpl diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedCoroutineIntrinsics.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedCoroutineIntrinsics.kt index 6a2b90e0d3ac..924b6038e32f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedCoroutineIntrinsics.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedCoroutineIntrinsics.kt @@ -2,6 +2,7 @@ // WITH_STDLIB // LANGUAGE_VERSION: 1.2 // ACTION: Create function 'suspendCoroutineOrReturn' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: suspendCoroutineOrReturn diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedFromImport.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedFromImport.kt index 6b8d8545f3bc..da0e5f709b83 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedFromImport.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/excludedFromImport.kt @@ -1,14 +1,15 @@ // "Import" "false" // WITH_STDLIB // ACTION: Compiler warning 'UNUSED_EXPRESSION' options -// ACTION: Create local variable 'FunctionReference' -// ACTION: Create object 'FunctionReference' -// ACTION: Create parameter 'FunctionReference' -// ACTION: Create property 'FunctionReference' // ACTION: Create annotation 'FunctionReference' // ACTION: Create class 'FunctionReference' // ACTION: Create enum 'FunctionReference' // ACTION: Create interface 'FunctionReference' +// ACTION: Create local variable 'FunctionReference' +// ACTION: Create object 'FunctionReference' +// ACTION: Create parameter 'FunctionReference' +// ACTION: Create property 'FunctionReference' +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: Rename reference // ERROR: Unresolved reference: FunctionReference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt index 074be4214921..7312295cc5db 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt @@ -1,6 +1,7 @@ // "Import" "false" // ACTION: Create extension function 'H?.inc' // ACTION: Create member function 'H.inc' +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ERROR: Unresolved reference: ++ diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importEnumValueMissingReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importEnumValueMissingReceiver.kt index 06ea07f1700e..88a550b72c7c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importEnumValueMissingReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importEnumValueMissingReceiver.kt @@ -3,6 +3,7 @@ // ACTION: Create extension property 'A.Companion.foo' // ACTION: Create member property 'A.Companion.foo' // ACTION: Create object 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importFunctionMissingReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importFunctionMissingReceiver.kt index 020ce5813bf5..9c175d3cf9f2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importFunctionMissingReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importFunctionMissingReceiver.kt @@ -4,6 +4,7 @@ // ACTION: Convert to with // ACTION: Create extension function 'A.Companion.foo' // ACTION: Create member function 'A.Companion.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importFunctionMissingReceiverWithTypeAlias.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importFunctionMissingReceiverWithTypeAlias.kt index a215f381cfbf..20dc806c17da 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importFunctionMissingReceiverWithTypeAlias.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/importFunctionMissingReceiverWithTypeAlias.kt @@ -1,6 +1,7 @@ // "Import" "false" // ACTION: Convert to run // ACTION: Convert to with +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallExtensionGetNoOperator.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallExtensionGetNoOperator.test index a9aa9582faef..23b735b26822 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallExtensionGetNoOperator.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallExtensionGetNoOperator.test @@ -4,6 +4,7 @@ // ERROR: No get method providing array access // ACTION: Create extension function 'Some.get' // ACTION: Create member function 'Some.get' +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenGetNeededButSetAvailable.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenGetNeededButSetAvailable.test index 64ef673c2b54..51cfcec98ed4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenGetNeededButSetAvailable.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenGetNeededButSetAvailable.test @@ -5,6 +5,7 @@ // ACTION: Converts the assignment statement to an expression // ACTION: Create extension function 'Some.set' // ACTION: Create member function 'Some.set' +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenSetNeededButGetAvailable.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenSetNeededButGetAvailable.test index 57a53a56eed9..54cd4f6ff165 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenSetNeededButGetAvailable.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/indexCallNoImportWhenSetNeededButGetAvailable.test @@ -4,6 +4,7 @@ // ERROR: No get method providing array access // ACTION: Create extension function 'Some.get' // ACTION: Create member function 'Some.get' +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/infixCall2.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/infixCall2.before.Main.kt index 220150f8f64d..dd4310cbd8fe 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/infixCall2.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/infixCall2.before.Main.kt @@ -2,6 +2,7 @@ // ERROR: Unresolved reference: foo // ACTION: Create extension function 'H.foo' // ACTION: Create member function 'H.foo' +// ACTION: Do not show return expression hints // ACTION: Replace infix call with ordinary call package h diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/invokeExtensionNoOperator.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/invokeExtensionNoOperator.test index 92b352776c18..1e2dfd150f40 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/invokeExtensionNoOperator.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/invokeExtensionNoOperator.test @@ -4,6 +4,7 @@ // ACTION: Add full qualifier // ACTION: Create extension function 'Some.invoke' // ACTION: Create member function 'Some.invoke' +// ACTION: Do not show return expression hints // ACTION: Introduce import alias diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForClassFunction.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForClassFunction.test index 85977ba299c3..96e129dea344 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForClassFunction.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForClassFunction.test @@ -2,6 +2,7 @@ // "class org.jetbrains.kotlin.idea.quickfix.ImportMemberFix" "false" // ERROR: Unresolved reference: foobar // ACTION: Create function 'foobar' +// ACTION: Do not show return expression hints // ACTION: Rename reference //KT-9009 diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForClassProperty.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForClassProperty.test index 933156e955cd..93d60fc3b930 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForClassProperty.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForClassProperty.test @@ -1,9 +1,10 @@ // FILE: main.before.kt // "class org.jetbrains.kotlin.idea.quickfix.ImportMemberFix" "false" // ERROR: Unresolved reference: foobar -// ACTION: Create local variable 'foobar' // ACTION: Converts the assignment statement to an expression +// ACTION: Create local variable 'foobar' // ACTION: Create property 'foobar' +// ACTION: Do not show return expression hints // ACTION: Rename reference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticField.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticField.test index 97c961d9043d..6de0ace755e2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticField.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticField.test @@ -1,10 +1,11 @@ // FILE: main.before.kt // "class org.jetbrains.kotlin.idea.quickfix.ImportMemberFix" "false" // ERROR: Unresolved reference: foobar +// ACTION: Converts the assignment statement to an expression // ACTION: Create local variable 'foobar' // ACTION: Create property 'foobar' +// ACTION: Do not show return expression hints // ACTION: Rename reference -// ACTION: Converts the assignment statement to an expression //KT-9009 diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticMethod.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticMethod.test index 871d8a3db27e..e84dec673cea 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticMethod.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForJavaNonStaticMethod.test @@ -2,6 +2,7 @@ // "class org.jetbrains.kotlin.idea.quickfix.ImportMemberFix" "false" // ERROR: Unresolved reference: foobar // ACTION: Create function 'foobar' +// ACTION: Do not show return expression hints // ACTION: Rename reference //KT-9009 diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForTopLevelFunction.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForTopLevelFunction.test index a4901e25704d..2b9577fcd2fc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForTopLevelFunction.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/memberImportNotForTopLevelFunction.test @@ -2,6 +2,7 @@ // "class org.jetbrains.kotlin.idea.quickfix.ImportMemberFix" "false" // ERROR: Unresolved reference: foobar // ACTION: Create function 'foobar' +// ACTION: Do not show return expression hints // ACTION: Import // ACTION: Rename reference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test index aff90bc8b552..41ec1f792eae 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test @@ -4,6 +4,7 @@ // ACTION: Add full qualifier // ACTION: Create extension function 'Some.component1' // ACTION: Create member function 'Some.component1' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Introduce import alias diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noFunctionImportOnSimpleName.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noFunctionImportOnSimpleName.test index c842531c7a80..0379bd125423 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noFunctionImportOnSimpleName.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noFunctionImportOnSimpleName.test @@ -4,6 +4,7 @@ // ACTION: Create object 'foobar' // ACTION: Create parameter 'foobar' // ACTION: Create property 'foobar' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foobar diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForFunInQualifiedNotFirst.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForFunInQualifiedNotFirst.before.Main.kt index 44db4a1bb814..0fe2300ab683 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForFunInQualifiedNotFirst.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForFunInQualifiedNotFirst.before.Main.kt @@ -1,4 +1,5 @@ // "Import" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: externalFun diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForIndex.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForIndex.kt index ec0725dec292..730ca7ea8e33 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForIndex.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForIndex.kt @@ -1,4 +1,5 @@ // "Import" "false" +// ACTION: Do not show return expression hints // ERROR: Unresolved reference: some[12] // ERROR: No get method providing array access diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForNestedInPrivate.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForNestedInPrivate.before.Main.kt index df0ef4bdafcf..226e37daadf2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForNestedInPrivate.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForNestedInPrivate.before.Main.kt @@ -3,6 +3,7 @@ // ACTION: Create object 'Nested' // ACTION: Create parameter 'Nested' // ACTION: Create property 'Nested' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: Nested diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForPrivateClass.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForPrivateClass.before.Main.kt index 9bc657a2c62a..ba7f7f7024c6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForPrivateClass.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForPrivateClass.before.Main.kt @@ -3,6 +3,7 @@ // ACTION: Create object 'PrivateClass' // ACTION: Create parameter 'PrivateClass' // ACTION: Create property 'PrivateClass' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: PrivateClass diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForPrivateFunction.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForPrivateFunction.before.Main.kt index f9a5ba36a818..cd8cf1705a7f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForPrivateFunction.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportForPrivateFunction.before.Main.kt @@ -1,5 +1,6 @@ // "Import" "false" // ACTION: Create function 'privateFun' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: privateFun diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInImports.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInImports.before.Main.kt index 038f79eb1721..b3b0d0b081b7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInImports.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInImports.before.Main.kt @@ -1,9 +1,10 @@ // "Import" "false" // ACTION: Create annotation 'SomeTest' // ACTION: Create class 'SomeTest' -// ACTION: Create interface 'SomeTest' // ACTION: Create enum 'SomeTest' +// ACTION: Create interface 'SomeTest' // ACTION: Create object 'SomeTest' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: SomeTest diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInQualifiedExpressionNotFirst.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInQualifiedExpressionNotFirst.before.Main.kt index 27d2974b9d2f..17e4eaa3ac01 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInQualifiedExpressionNotFirst.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInQualifiedExpressionNotFirst.before.Main.kt @@ -1,7 +1,8 @@ // "Import" "false" -// ACTION: Convert to lazy property // ACTION: Convert property initializer to getter +// ACTION: Convert to lazy property // ACTION: Create class 'SomeTest' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: SomeTest diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInSafeQualifiedExpressionNotFirst.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInSafeQualifiedExpressionNotFirst.before.Main.kt index d04f3cec266a..7b434ccd4324 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInSafeQualifiedExpressionNotFirst.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noImportInSafeQualifiedExpressionNotFirst.before.Main.kt @@ -1,11 +1,12 @@ // "Import" "false" // ERROR: Unresolved reference: SomeTest // ERROR: Expression expected, but a package name found -// ACTION: Convert to lazy property // ACTION: Convert property initializer to getter +// ACTION: Convert to lazy property // ACTION: Create class 'SomeTest' -// ACTION: Replace safe access expression with 'if' expression +// ACTION: Do not show return expression hints // ACTION: Rename reference +// ACTION: Replace safe access expression with 'if' expression package testing diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noMemberFunctionImportOnSimpleName.test b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noMemberFunctionImportOnSimpleName.test index 81ae6fb1bf31..06abfe5f0bd8 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noMemberFunctionImportOnSimpleName.test +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/noMemberFunctionImportOnSimpleName.test @@ -4,6 +4,7 @@ // ACTION: Create object 'foobar' // ACTION: Create parameter 'foobar' // ACTION: Create property 'foobar' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foobar diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notExcludedFromImportWhenInternalUse.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notExcludedFromImportWhenInternalUse.kt index 43957a94ea4c..c01d39906dce 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notExcludedFromImportWhenInternalUse.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notExcludedFromImportWhenInternalUse.kt @@ -9,6 +9,7 @@ // ACTION: Create object 'FunctionReference' // ACTION: Create parameter 'FunctionReference' // ACTION: Create property 'FunctionReference' +// ACTION: Do not show return expression hints // ACTION: Import // ACTION: Introduce local variable // ACTION: Rename reference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notExcludedFromImportWhenInternalUse.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notExcludedFromImportWhenInternalUse.kt.after index 1dab4c73bc14..19aa373d1609 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notExcludedFromImportWhenInternalUse.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notExcludedFromImportWhenInternalUse.kt.after @@ -9,6 +9,7 @@ // ACTION: Create object 'FunctionReference' // ACTION: Create parameter 'FunctionReference' // ACTION: Create property 'FunctionReference' +// ACTION: Do not show return expression hints // ACTION: Import // ACTION: Introduce local variable // ACTION: Rename reference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notForThisLabel.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notForThisLabel.kt index 63061907ea30..67216c4e04dc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notForThisLabel.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/notForThisLabel.kt @@ -1,4 +1,5 @@ // "Import" "false" +// ACTION: Do not show return expression hints // ERROR: Unresolved reference: @String fun refer() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/packageClass.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/packageClass.before.Main.kt index 1e12995acb97..1cd178089e4f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/packageClass.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/packageClass.before.Main.kt @@ -1,6 +1,7 @@ // "Import" "false" -// ACTION: Create function 'FooPackage' // ACTION: Create class 'FooPackage' +// ACTION: Create function 'FooPackage' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: FooPackage diff --git a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt index 1c1b5c7f21c3..4ffd2f1e0a07 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt @@ -2,6 +2,7 @@ // ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public operator fun String?.plus(other: Any?): String defined in kotlin // ACTION: Create extension function 'JustClass.plus' // ACTION: Create member function 'JustClass.plus' +// ACTION: Do not show return expression hints // ACTION: Flip '+' // ACTION: Replace overloaded operator with function call // COMPILER_ARGUMENTS: -XXLanguage:-NewInference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/nonPublic/reifiedTypeParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/nonPublic/reifiedTypeParameter.kt index 270bd21ac55b..2315720057f5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/nonPublic/reifiedTypeParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/nonPublic/reifiedTypeParameter.kt @@ -1,7 +1,8 @@ // "Remove 'inline' modifier" "false" -// ACTION: Make 'foo' public -// ACTION: Make 'bar' private +// ACTION: Do not show return expression hints // ACTION: Expand boolean expression to 'if else' +// ACTION: Make 'bar' private +// ACTION: Make 'foo' public // ACTION: Remove braces from all 'if' statements // ERROR: Public-API inline function cannot access non-public-API 'private final val foo: Boolean defined in C' // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/protected/reifiedTypeParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/protected/reifiedTypeParameter.kt index 0423c4526ac0..77d6e3d0c1bd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/protected/reifiedTypeParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/protected/reifiedTypeParameter.kt @@ -1,4 +1,5 @@ // "Remove 'inline' modifier" "false" +// ACTION: Do not show return expression hints // ACTION: Expand boolean expression to 'if else' // ACTION: Make 'bar' protected // ACTION: Make 'protectedMethod' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/super/reifiedTypeParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/super/reifiedTypeParameter.kt index f440290ed923..cef077a3a023 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/super/reifiedTypeParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/callFromPublicInline/super/reifiedTypeParameter.kt @@ -1,5 +1,6 @@ // "Remove 'inline' modifier" "false" // ERROR: Accessing super members from public-API inline function is deprecated +// ACTION: Do not show return expression hints // ACTION: Expand boolean expression to 'if else' // ACTION: Make 'bar' internal // ACTION: Make 'bar' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeSignature/removeUnusedParameterOfPropertySetter.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeSignature/removeUnusedParameterOfPropertySetter.kt index d08623ed9866..065f6bb85d47 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeSignature/removeUnusedParameterOfPropertySetter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeSignature/removeUnusedParameterOfPropertySetter.kt @@ -1,5 +1,6 @@ // "Remove parameter 'value'" "false" // ACTION: Compiler warning 'UNUSED_PARAMETER' options +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Specify type explicitly class Abacaba { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleInner.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleInner.kt index c2dbc8860bc0..a844a0dc7ea0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleInner.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleInner.kt @@ -1,6 +1,7 @@ // "Change to 'return@forEach'" "true" // ACTION: Change to 'return@foo' // ACTION: Change to 'return@forEach' +// ACTION: Do not show return expression hints // ERROR: The integer literal does not conform to the expected type Unit // WITH_STDLIB // COMPILER_ARGUMENTS: -XXLanguage:-NewInference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleInner.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleInner.kt.after index 3bde170e4190..67623f65f303 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleInner.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleInner.kt.after @@ -1,6 +1,7 @@ // "Change to 'return@forEach'" "true" // ACTION: Change to 'return@foo' // ACTION: Change to 'return@forEach' +// ACTION: Do not show return expression hints // ERROR: The integer literal does not conform to the expected type Unit // WITH_STDLIB // COMPILER_ARGUMENTS: -XXLanguage:-NewInference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleOuter.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleOuter.kt index 95c175d2951e..9acefcf3ce47 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleOuter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleOuter.kt @@ -1,6 +1,7 @@ // "Change to 'return@foo'" "true" // ACTION: Change to 'return@foo' // ACTION: Change to 'return@forEach' +// ACTION: Do not show return expression hints // WITH_STDLIB fun foo(f:()->Int){} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleOuter.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleOuter.kt.after index 8edc8ae21966..214852b7170e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleOuter.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/multipleOuter.kt.after @@ -1,6 +1,7 @@ // "Change to 'return@foo'" "true" // ACTION: Change to 'return@foo' // ACTION: Change to 'return@forEach' +// ACTION: Do not show return expression hints // WITH_STDLIB fun foo(f:()->Int){} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/noCandidates.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/noCandidates.kt index c507295f8b18..15b74a33e9f9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/noCandidates.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/noCandidates.kt @@ -1,4 +1,5 @@ // "Change to 'return@init'" "false" +// ACTION: Do not show return expression hints // ERROR: 'return' is not allowed here // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/nullForNonnullType2.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/nullForNonnullType2.kt index eee497c32576..b4842309a415 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/nullForNonnullType2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/nullForNonnullType2.kt @@ -1,6 +1,7 @@ // "Change to 'return@foo'" "false" // ACTION: Add braces to 'if' statement // ACTION: Change return type of enclosing function 'test' to 'Unit?' +// ACTION: Do not show return expression hints // DISABLE-ERRORS inline fun foo(f: (Int) -> Int) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInClass.kt index 57b9c124cd3e..a1c029e7af12 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInClass.kt @@ -5,6 +5,7 @@ // ACTION: Add braces to all 'if' statements // ACTION: Convert property initializer to getter // ACTION: Convert to lazy property +// ACTION: Do not show return expression hints // ACTION: Move to constructor // WITH_STDLIB fun main() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInObject.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInObject.kt index 35c07d619d8e..e19d79852fd5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInObject.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInObject.kt @@ -6,6 +6,7 @@ // ACTION: Add braces to all 'if' statements // ACTION: Convert property initializer to getter // ACTION: Convert to lazy property +// ACTION: Do not show return expression hints // ACTION: Go To Super Property // ACTION: Introduce local variable // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/typeMismatch2.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/typeMismatch2.kt index 091eb4c83d74..a69aac4d674f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/typeMismatch2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/typeMismatch2.kt @@ -4,6 +4,7 @@ // ACTION: Change return type of called function 'baz' to 'Unit' // ACTION: Change return type of enclosing function 'test' to 'String' // ACTION: Convert to single-line lambda +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Move lambda argument into parentheses // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToMutableCollection/set.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToMutableCollection/set.kt index 130a3cb6763b..5198a9f29878 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToMutableCollection/set.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToMutableCollection/set.kt @@ -1,6 +1,7 @@ // "Change type to MutableSet" "false" // DISABLE-ERRORS // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // WITH_STDLIB fun main() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/hasInitializer.kt b/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/hasInitializer.kt index 8b1ce62c770a..76487e5d528f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/hasInitializer.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/hasInitializer.kt @@ -1,5 +1,6 @@ // "Convert to notNull delegate" "false" // DISABLE-ERRORS +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ACTION: Remove 'lateinit' modifier diff --git a/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/notPrimitive.kt b/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/notPrimitive.kt index 714b31a7cb7c..ae09a04f8534 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/notPrimitive.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/notPrimitive.kt @@ -1,5 +1,6 @@ // "Convert to notNull delegate" "false" // ACTION: Convert to nullable var +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private lateinit var x: String \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/nullablePrimitive.kt b/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/nullablePrimitive.kt index b6e5019ada93..f7af011d0a89 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/nullablePrimitive.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/nullablePrimitive.kt @@ -1,5 +1,6 @@ // "Convert to notNull delegate" "false" // DISABLE-ERRORS +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make not-nullable // ACTION: Make private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/val.kt b/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/val.kt index e231fcf76951..715ed9b66eba 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/val.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/convertLateinitPropertyToNotNullDelegate/val.kt @@ -1,6 +1,7 @@ // "Convert to notNull delegate" "false" // DISABLE-ERRORS // ACTION: Change to 'var' +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ACTION: Remove 'lateinit' modifier diff --git a/plugins/kotlin/idea/tests/testData/quickfix/convertToAnonymousObject/multiMethod.kt b/plugins/kotlin/idea/tests/testData/quickfix/convertToAnonymousObject/multiMethod.kt index 5d93fa340595..8c4208bb1af7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/convertToAnonymousObject/multiMethod.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/convertToAnonymousObject/multiMethod.kt @@ -1,4 +1,5 @@ // "Convert to anonymous object" "false" +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ERROR: Interface I does not have constructors interface I { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalJavaSupertype.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalJavaSupertype.before.Main.kt index 5ce3259d3362..d31b746a37d4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalJavaSupertype.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalJavaSupertype.before.Main.kt @@ -1,6 +1,7 @@ // "Create class 'Foo'" "false" -// ACTION: Create function 'Foo' // ACTION: Convert to block body +// ACTION: Create function 'Foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: Foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalSupertype.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalSupertype.kt index f5ae1bc5aaf9..e009ac908441 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalSupertype.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalSupertype.kt @@ -1,6 +1,7 @@ // "Create class 'Foo'" "false" -// ACTION: Create function 'Foo' // ACTION: Convert to block body +// ACTION: Create function 'Foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: Foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithGroovyClassQualifier.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithGroovyClassQualifier.before.Main.kt index ece1715b3bc3..b5a698b41a3f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithGroovyClassQualifier.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithGroovyClassQualifier.before.Main.kt @@ -1,4 +1,5 @@ // "Create class 'Foo'" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: Foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithLibClassQualifier.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithLibClassQualifier.kt index fb2927449475..bd8683b35bbf 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithLibClassQualifier.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/callWithLibClassQualifier.kt @@ -1,5 +1,6 @@ // "Create class 'Foo'" "false" // ACTION: Create extension function 'Int.Foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: Foo // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/extension.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/extension.kt index bcd82fc7f903..6ef016763747 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/extension.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/extension.kt @@ -1,5 +1,6 @@ // "Create class 'Foo'" "false" // ACTION: Create extension function 'List.Foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: Foo // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry2.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry2.kt index 40c0b4a4f5db..bb91d59efa56 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry2.kt @@ -2,6 +2,7 @@ // ACTION: Create class 'Unknown' // ACTION: Create interface 'Unknown' // ACTION: Create type parameter 'Unknown' in class 'A' +// ACTION: Do not show return expression hints // DISABLE-ERRORS class A : Unknown { } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry2.kt.after index d5e7e36c2bdf..ab690fdd0fb0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry2.kt.after @@ -2,6 +2,7 @@ // ACTION: Create class 'Unknown' // ACTION: Create interface 'Unknown' // ACTION: Create type parameter 'Unknown' in class 'A' +// ACTION: Do not show return expression hints // DISABLE-ERRORS class A : Unknown { } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry3.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry3.kt index a646d79f28ac..cd038c687105 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry3.kt @@ -2,6 +2,7 @@ // ACTION: Create class 'Unknown' // ACTION: Create interface 'Unknown' // ACTION: Create type parameter 'Unknown' in class 'A' +// ACTION: Do not show return expression hints // DISABLE-ERRORS class A() : Unknown { constructor(i: Int) : this() diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry3.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry3.kt.after index 0512befcfe1c..41bf47a563bd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry3.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/delegationSpecifier/createSuperClassFromSuperTypeEntry3.kt.after @@ -2,6 +2,7 @@ // ACTION: Create class 'Unknown' // ACTION: Create interface 'Unknown' // ACTION: Create type parameter 'Unknown' in class 'A' +// ACTION: Do not show return expression hints // DISABLE-ERRORS class A() : Unknown { constructor(i: Int) : this() diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/classWithGroovyQualifier.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/classWithGroovyQualifier.before.Main.kt index 6e26543b6536..680d2e53a9d7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/classWithGroovyQualifier.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/classWithGroovyQualifier.before.Main.kt @@ -1,4 +1,5 @@ // "Create class 'A'" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A import J.A diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInJavaEnum.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInJavaEnum.before.Main.kt index bec3de9ecec1..77916080e3f7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInJavaEnum.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInJavaEnum.before.Main.kt @@ -3,6 +3,7 @@ // ACTION: Create class 'A' // ACTION: Create enum 'A' // ACTION: Create interface 'A' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A import E.A diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInPackage.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInPackage.kt index 5e19f5c6aa92..59f06491822d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInPackage.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInPackage.kt @@ -1,9 +1,10 @@ // "Create enum constant 'A'" "false" +// ACTION: Create annotation 'A' // ACTION: Create class 'A' +// ACTION: Create enum 'A' // ACTION: Create interface 'A' // ACTION: Create object 'A' -// ACTION: Create enum 'A' -// ACTION: Create annotation 'A' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryWithQualifier.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryWithQualifier.kt index f974ebafe115..8a3bea83b5b7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryWithQualifier.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryWithQualifier.kt @@ -1,9 +1,10 @@ // "Create enum constant 'A'" "false" +// ACTION: Create annotation 'A' // ACTION: Create class 'A' +// ACTION: Create enum 'A' // ACTION: Create interface 'A' // ACTION: Create object 'A' -// ACTION: Create enum 'A' -// ACTION: Create annotation 'A' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/objectWithJavaQualifier.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/objectWithJavaQualifier.before.Main.kt index b85d3521277c..0c5e394270a2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/objectWithJavaQualifier.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/importDirective/objectWithJavaQualifier.before.Main.kt @@ -2,8 +2,9 @@ // ERROR: Unresolved reference: A // ACTION: Create annotation 'A' // ACTION: Create class 'A' -// ACTION: Create interface 'A' // ACTION: Create enum 'A' +// ACTION: Create interface 'A' +// ACTION: Do not show return expression hints // ACTION: Rename reference import J.A diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedGroovyQualifier.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedGroovyQualifier.before.Main.kt index 2e6fcf20efcb..60382b76bce4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedGroovyQualifier.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedGroovyQualifier.before.Main.kt @@ -1,5 +1,6 @@ // "Create class 'A'" "false" -// ACTION: Rename reference +// ACTION: Do not show return expression hints // ACTION: Introduce local variable +// ACTION: Rename reference // ERROR: Unresolved reference: A fun foo() = J.A.B diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classInPackage.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classInPackage.kt index 0b2d821f05e4..aa0b009c1700 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classInPackage.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classInPackage.kt @@ -1,5 +1,6 @@ // "Create class 'A'" "false" // ACTION: Create object 'A' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithQualifier.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithQualifier.kt index e0c91d7d3f76..c272533ca813 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithQualifier.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithQualifier.kt @@ -1,8 +1,9 @@ // "Create class 'A'" "false" -// ACTION: Create object 'A' -// ACTION: Rename reference // ACTION: Create extension property 'X.Companion.A' // ACTION: Create member property 'X.Companion.A' +// ACTION: Create object 'A' +// ACTION: Do not show return expression hints +// ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithReceiver.kt index 2cf245402218..d383102cf1d4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithReceiver.kt @@ -2,6 +2,7 @@ // ACTION: Create extension property 'X.A' // ACTION: Create member property 'X.A' // ACTION: Create property 'A' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumQualifier.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumQualifier.before.Main.kt index 8f43f9057648..f625ce27cea0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumQualifier.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumQualifier.before.Main.kt @@ -1,5 +1,6 @@ // "Create enum constant 'A'" "false" // ACTION: Create member property 'J.A' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A fun foo() = J.A diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumSuperclass.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumSuperclass.before.Main.kt index 93ea7e21de4b..af51fd987cc6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumSuperclass.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumSuperclass.before.Main.kt @@ -1,6 +1,7 @@ // "Create enum constant 'A'" "false" // ACTION: Convert to block body // ACTION: Create member property 'J.A' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A internal fun foo(): J = J.A diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumQualifier.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumQualifier.before.Main.kt index 8f43f9057648..f625ce27cea0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumQualifier.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumQualifier.before.Main.kt @@ -1,5 +1,6 @@ // "Create enum constant 'A'" "false" // ACTION: Create member property 'J.A' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A fun foo() = J.A diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumSuperclass.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumSuperclass.before.Main.kt index 4983e2725fb9..f6cc5b3fab10 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumSuperclass.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumSuperclass.before.Main.kt @@ -1,6 +1,7 @@ // "Create enum constant 'A'" "false" // ACTION: Convert to block body // ACTION: Create member property 'E.A' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A internal fun foo(): X = E.A diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithQualifier.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithQualifier.kt index ccd4c8dec3db..50fb48f39013 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithQualifier.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithQualifier.kt @@ -1,8 +1,9 @@ // "Create enum constant 'A'" "false" -// ACTION: Create object 'A' -// ACTION: Rename reference // ACTION: Create extension property 'X.Companion.A' // ACTION: Create member property 'X.Companion.A' +// ACTION: Create object 'A' +// ACTION: Do not show return expression hints +// ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithReceiver.kt index 4b12eeaa3064..7f4588e668ac 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithReceiver.kt @@ -2,6 +2,7 @@ // ACTION: Create extension property 'X.A' // ACTION: Create member property 'X.A' // ACTION: Create property 'A' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithSuperclass.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithSuperclass.kt index 542d08e42925..79b4f05b74b6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithSuperclass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithSuperclass.kt @@ -1,8 +1,9 @@ // "Create enum constant 'A'" "false" // ACTION: Convert to block body -// ACTION: Rename reference // ACTION: Create extension property 'E.Companion.A' // ACTION: Create member property 'E.Companion.A' +// ACTION: Do not show return expression hints +// ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectForEnumInEquals.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectForEnumInEquals.kt index b1d8daad1f50..2e4d28c3297e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectForEnumInEquals.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectForEnumInEquals.kt @@ -1,9 +1,10 @@ // "Create object 'RED'" "false" // ACTION: Create enum constant 'RED' -// ACTION: Expand boolean expression to 'if else' -// ACTION: Rename reference // ACTION: Create extension property 'SampleEnum.Companion.RED' // ACTION: Create member property 'SampleEnum.Companion.RED' +// ACTION: Do not show return expression hints +// ACTION: Expand boolean expression to 'if else' +// ACTION: Rename reference // ERROR: Unresolved reference: RED enum class SampleEnum {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithJavaQualifier.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithJavaQualifier.before.Main.kt index 548f18f98127..ecfa5bb40cb6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithJavaQualifier.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithJavaQualifier.before.Main.kt @@ -1,5 +1,6 @@ // "Create object 'A'" "false" // ACTION: Create member property 'J.A' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A fun foo() = J.A diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithReceiver.kt index f5befe96549c..2d5c46869974 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithReceiver.kt @@ -2,6 +2,7 @@ // ACTION: Create extension property 'X.A' // ACTION: Create member property 'X.A' // ACTION: Create property 'A' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/recursiveBound.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/recursiveBound.kt index 33c34689262c..a363f165a747 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/recursiveBound.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/referenceExpression/recursiveBound.kt @@ -2,8 +2,9 @@ // ACTION: Create local variable 'Foo' // ACTION: Create parameter 'Foo' // ACTION: Create property 'Foo' -// ACTION: Split property declaration +// ACTION: Do not show return expression hints // ACTION: Rename reference +// ACTION: Split property declaration // ERROR: Unresolved reference: Foo open class Cyclic> diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/annotationNotQualifierWithTypeArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/annotationNotQualifierWithTypeArgs.kt index bfe5ee6eb24f..27083d498860 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/annotationNotQualifierWithTypeArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/annotationNotQualifierWithTypeArgs.kt @@ -1,7 +1,8 @@ // "Create annotation 'A'" "false" +// ACTION: Convert to block body // ACTION: Create class 'A' // ACTION: Create interface 'A' -// ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/annotationQualifierNoTypeArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/annotationQualifierNoTypeArgs.kt index b74c022e9234..21cbb22b7635 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/annotationQualifierNoTypeArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/annotationQualifierNoTypeArgs.kt @@ -1,9 +1,10 @@ // "Create annotation 'A'" "false" -// ACTION: Create class 'A' -// ACTION: Create object 'A' -// ACTION: Create interface 'A' -// ACTION: Create enum 'A' // ACTION: Convert to block body +// ACTION: Create class 'A' +// ACTION: Create enum 'A' +// ACTION: Create interface 'A' +// ACTION: Create object 'A' +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/enumEntryNotQualifierNoTypeArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/enumEntryNotQualifierNoTypeArgs.kt index 3d0a911f1782..23b75eec64ac 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/enumEntryNotQualifierNoTypeArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/enumEntryNotQualifierNoTypeArgs.kt @@ -1,11 +1,12 @@ // "Create enum constant 'A'" "false" +// ACTION: Convert to block body // ACTION: Create annotation 'A' // ACTION: Create class 'A' -// ACTION: Create interface 'A' // ACTION: Create enum 'A' -// ACTION: Convert to block body -// ACTION: Remove explicit type specification +// ACTION: Create interface 'A' // ACTION: Create type parameter 'A' in function 'foo' +// ACTION: Do not show return expression hints +// ACTION: Remove explicit type specification // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/enumNotQualifierWithTypeArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/enumNotQualifierWithTypeArgs.kt index 6fc187b6373c..0e4af79176fa 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/enumNotQualifierWithTypeArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/enumNotQualifierWithTypeArgs.kt @@ -1,7 +1,8 @@ // "Create enum 'A'" "false" +// ACTION: Convert to block body // ACTION: Create class 'A' // ACTION: Create interface 'A' -// ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noAnnotationForTypeBound.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noAnnotationForTypeBound.kt index 28086f9d97f2..7641147c5445 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noAnnotationForTypeBound.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noAnnotationForTypeBound.kt @@ -1,8 +1,9 @@ // "Create annotation 'NotExistent'" "false" // ACTION: Create class 'NotExistent' // ACTION: Create interface 'NotExistent' -// ACTION: Create type parameter 'NotExistent' in class 'TPB' // ACTION: Create test +// ACTION: Create type parameter 'NotExistent' in class 'TPB' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ERROR: Unresolved reference: NotExistent class TPBNotExistent> \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noEnumForTypeBound.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noEnumForTypeBound.kt index f5d6b644036d..459eb0a3027e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noEnumForTypeBound.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noEnumForTypeBound.kt @@ -1,8 +1,9 @@ // "Create enum 'NotExistent'" "false" // ACTION: Create class 'NotExistent' // ACTION: Create interface 'NotExistent' -// ACTION: Create type parameter 'NotExistent' in class 'TPB' // ACTION: Create test +// ACTION: Create type parameter 'NotExistent' in class 'TPB' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ERROR: Unresolved reference: NotExistent class TPBNotExistent> \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noObjectForTypeBound.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noObjectForTypeBound.kt index 7f346102cfd3..4686450a9a3a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noObjectForTypeBound.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/noObjectForTypeBound.kt @@ -1,8 +1,9 @@ // "Create object 'NotExistent'" "false" // ACTION: Create class 'NotExistent' // ACTION: Create interface 'NotExistent' -// ACTION: Create type parameter 'NotExistent' in class 'TPB' // ACTION: Create test +// ACTION: Create type parameter 'NotExistent' in class 'TPB' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ERROR: Unresolved reference: NotExistent class TPBNotExistent> \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierNoTypeArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierNoTypeArgs.kt index dfc09a469bb3..2fcc1ad4ad29 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierNoTypeArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierNoTypeArgs.kt @@ -1,11 +1,12 @@ // "Create object 'A'" "false" +// ACTION: Convert to block body // ACTION: Create annotation 'A' // ACTION: Create class 'A' -// ACTION: Create interface 'A' // ACTION: Create enum 'A' -// ACTION: Convert to block body -// ACTION: Remove explicit type specification +// ACTION: Create interface 'A' // ACTION: Create type parameter 'A' in function 'foo' +// ACTION: Do not show return expression hints +// ACTION: Remove explicit type specification // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierWithTypeArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierWithTypeArgs.kt index edbc437c6d49..6cd203fc1a0c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierWithTypeArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierWithTypeArgs.kt @@ -1,7 +1,8 @@ // "Create object 'A'" "false" +// ACTION: Convert to block body // ACTION: Create class 'A' // ACTION: Create interface 'A' -// ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification // ERROR: Unresolved reference: A package p diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/companion.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/companion.kt index 71af2f0d7cc2..1a0f52dce38a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/companion.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/companion.kt @@ -1,6 +1,7 @@ // "Create abstract function 'A.Companion.foo'" "false" // ACTION: Create extension function 'A.Companion.foo' // ACTION: Create member function 'A.Companion.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/noAbstractSuperclass.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/noAbstractSuperclass.kt index 1b3cf9574972..1820793d754e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/noAbstractSuperclass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/noAbstractSuperclass.kt @@ -1,5 +1,6 @@ // "Create abstract function 'Foo.bar'" "false" // ACTION: Create function 'bar' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: bar diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/notWritableAbstractSuperclass.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/notWritableAbstractSuperclass.kt index 196a59fa1ed1..05f3a0a8b74f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/notWritableAbstractSuperclass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/notWritableAbstractSuperclass.kt @@ -1,5 +1,6 @@ // "Create abstract function 'bar'" "false" // ACTION: Create function 'bar' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: bar class Foo : Runnable { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/otherExplicitReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/otherExplicitReceiver.kt index 009bf228daa1..09f8f87ddcc3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/otherExplicitReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/abstract/otherExplicitReceiver.kt @@ -1,8 +1,9 @@ // "Create abstract function 'foo'" "false" +// ACTION: Add 'b =' to argument // ACTION: Create extension function 'B.foo' // ACTION: Create member function 'B.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference -// ACTION: Add 'b =' to argument // ERROR: Unresolved reference: foo abstract class A { fun bar(b: Boolean) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/binaryOperationInCall.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/binaryOperationInCall.kt index 2dab8873e275..84469012925a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/binaryOperationInCall.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/binaryOperationInCall.kt @@ -2,6 +2,7 @@ // ACTION: Add 'p =' to argument // ACTION: Create extension function 'Operated.plus' // ACTION: Create member function 'Operated.plus' +// ACTION: Do not show return expression hints // ACTION: Flip '+' // ACTION: Replace overloaded operator with function call // DISABLE-ERRORS diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/extensionRefInImport.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/extensionRefInImport.kt index 2238f37a9b64..24f4a85c564a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/extensionRefInImport.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/extensionRefInImport.kt @@ -1,4 +1,5 @@ // "Create extension function 'foo'" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/funOnGroovyType.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/funOnGroovyType.before.Main.kt index 2a1cbcdd97f8..157361455cbf 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/funOnGroovyType.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/funOnGroovyType.before.Main.kt @@ -1,5 +1,6 @@ // "Create member function 'foo'" "false" // ACTION: Create extension function 'A.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt index 7816a79ec1e6..891f33c3c698 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt @@ -5,9 +5,10 @@ // ACTION: Create object 'maximumSizeOfGroup' // ACTION: Create parameter 'maximumSizeOfGroup' // ACTION: Create property 'maximumSizeOfGroup' +// ACTION: Do not show return expression hints +// ACTION: Expand boolean expression to 'if else' // ACTION: Introduce local variable // ACTION: Rename reference -// ACTION: Expand boolean expression to 'if else' // ERROR: A 'return' expression required in a function with a block body ('{...}') // ERROR: The expression cannot be a selector (occur after a dot) // ERROR: Type inference failed: inline fun Iterable.firstOrNull(predicate: (T) -> Boolean): T?
cannot be applied to
receiver: Collection> arguments: ((List) -> () -> Boolean)
diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/notExactArgument.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/notExactArgument.kt index e7382bd8e3c4..5e0c35a52084 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/notExactArgument.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/notExactArgument.kt @@ -1,6 +1,7 @@ // "Create function 'synchronized'" "false" -// ACTION: Converts the assignment statement to an expression // ACTION: Convert expression to 'Int' +// ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ACTION: Round using roundToInt() // ERROR: Type mismatch: inferred type is Float but Int was expected // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/propertyOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/propertyOnUserType.kt index 0c1f71f7b561..80dd28ba9913 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/propertyOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/propertyOnUserType.kt @@ -1,5 +1,6 @@ // "Create member function 'foo'" "false" // ACTION: Add names to call arguments +// ACTION: Do not show return expression hints // ERROR: Unresolved reference: x class A(val n: T) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/refInImport.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/refInImport.kt index 162d90aeb9a6..2e6285f14b4b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/refInImport.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/refInImport.kt @@ -1,4 +1,5 @@ // "Create function 'foo'" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/staticExtensionFunOnJavaClass.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/staticExtensionFunOnJavaClass.before.Main.kt index 8dbbee6bee12..46e33d2b25fa 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/staticExtensionFunOnJavaClass.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/staticExtensionFunOnJavaClass.before.Main.kt @@ -1,5 +1,6 @@ // "Create extension function 'J.foo'" "false" // ACTION: Create member function 'J.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaInterface.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaInterface.before.Main.kt index ecd1eb1451bf..c06dd762c409 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaInterface.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaInterface.before.Main.kt @@ -1,5 +1,6 @@ // "Create function 'foo'" "false" // "Create member function 'foo'" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/memberWithTypeParameterAsReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/memberWithTypeParameterAsReceiver.kt index f57dbb5b3b5a..d525a7ff3234 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/memberWithTypeParameterAsReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/memberWithTypeParameterAsReceiver.kt @@ -1,8 +1,9 @@ // "Create member function 'bar'" "false" -// ACTION: Create extension function 'T.bar' -// ACTION: Rename reference // ACTION: Convert to run // ACTION: Convert to with +// ACTION: Create extension function 'T.bar' +// ACTION: Do not show return expression hints +// ACTION: Rename reference // ERROR: Unresolved reference: bar fun foo(t: T) { t.bar() diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/callableReferences/noFunctionalType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/callableReferences/noFunctionalType.kt index 095eceea2c40..17e2d0d4616f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/callableReferences/noFunctionalType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/callableReferences/noFunctionalType.kt @@ -1,6 +1,7 @@ // "Create function 'foo'" "false" -// ACTION: Rename reference // ACTION: Add 'n =' to argument +// ACTION: Do not show return expression hints +// ACTION: Rename reference // ERROR: Unresolved reference: foo fun bar(n: Int) = "$n" diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty.kt index 567de2f5db68..8c569afcedf6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty.kt @@ -5,6 +5,7 @@ // ACTION: Create class 'T' // ACTION: Create enum 'T' // ACTION: Create interface 'T' +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification // ERROR: Unresolved reference: T val a: T? = null \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty2.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty2.kt index 29ff554aa5da..86c0c4222f48 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty2.kt @@ -6,6 +6,7 @@ // ACTION: Create enum 'T' // ACTION: Create interface 'T' // ACTION: Create type parameter 'T' in class 'Test' +// ACTION: Do not show return expression hints // ACTION: Move to constructor // ACTION: Remove explicit type specification // ERROR: Unresolved reference: T diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty3.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty3.kt index 9f2b1b878039..a279b1f41ca6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty3.kt @@ -3,6 +3,7 @@ // ACTION: Create class 'T' // ACTION: Create enum 'T' // ACTION: Create interface 'T' +// ACTION: Do not show return expression hints // ERROR: Unresolved reference: T val a = fun() { val b: T diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inSuperTypeEntry.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inSuperTypeEntry.kt index a92fad7e7720..57483576bd32 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inSuperTypeEntry.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inSuperTypeEntry.kt @@ -1,6 +1,7 @@ // "Create type parameter 'Test' in class 'C'" "false" // ACTION: Create class 'Test' // ACTION: Create test +// ACTION: Do not show return expression hints // ERROR: Unresolved reference: Test class C : Test() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/typeQualifier.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/typeQualifier.kt index 096c3bb61be7..df0d14fa189f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/typeQualifier.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/typeQualifier.kt @@ -3,6 +3,7 @@ // ACTION: Create enum 'X' // ACTION: Create interface 'X' // ACTION: Create object 'X' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ERROR: Unresolved reference: X diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/withTypeArguments.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/withTypeArguments.kt index 85fee88b2d35..dd7a9c57eacd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/withTypeArguments.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/withTypeArguments.kt @@ -1,6 +1,7 @@ // "Create type parameter 'X'" "false" // ACTION: Create class 'X' // ACTION: Create interface 'X' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ERROR: Unresolved reference: X diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/notOnTypeArgumentList.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/notOnTypeArgumentList.kt index 2028958cf5ad..20a79c3476fd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/notOnTypeArgumentList.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/notOnTypeArgumentList.kt @@ -1,4 +1,5 @@ // "Create type parameter in class 'X'" "false" +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Introduce import alias // ERROR: No type arguments expected for class X diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/callableRef.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/callableRef.kt index f98ade8945dc..dae2868f768c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/callableRef.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/callableRef.kt @@ -1,7 +1,8 @@ // "Create local variable 'foo'" "false" -// ACTION: Rename reference -// ACTION: Create function 'foo' // ACTION: Add 'f =' to argument +// ACTION: Create function 'foo' +// ACTION: Do not show return expression hints +// ACTION: Rename reference // ERROR: Unresolved reference: foo fun test(f: (Int) -> Int) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessor.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessor.kt index 36f9af8536b2..af2c7c50fd9d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessor.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessor.kt @@ -2,6 +2,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' // ACTION: Create property 'foo' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Rename reference class A { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessor.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessor.kt.after index 65a80e601f9f..8996995d9794 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessor.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessor.kt.after @@ -2,6 +2,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' // ACTION: Create property 'foo' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Rename reference class A { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessorWithExpressionBody.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessorWithExpressionBody.kt index a59b688409e8..8cec88f1e380 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessorWithExpressionBody.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessorWithExpressionBody.kt @@ -4,6 +4,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' // ACTION: Create property 'foo' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Rename reference class A { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessorWithExpressionBody.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessorWithExpressionBody.kt.after index bb5312cb484a..216e9c1d9dd7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessorWithExpressionBody.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessorWithExpressionBody.kt.after @@ -4,6 +4,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' // ACTION: Create property 'foo' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Rename reference class A { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAnnotation.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAnnotation.kt index 611c8993259e..812c5cfd37c2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAnnotation.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inAnnotation.kt @@ -1,6 +1,7 @@ // "Create local variable 'defaultPreferencesName'" "false" // ACTION: Create parameter 'defaultPreferencesName' // ACTION: Create property 'defaultPreferencesName' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ERROR: Unresolved reference: defaultPreferencesName diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inBinaryOperation.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inBinaryOperation.kt index 3c8dfb1d8e90..48e2f4b91dd5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inBinaryOperation.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inBinaryOperation.kt @@ -1,6 +1,7 @@ // "Create local variable 'foo'" "false" // ERROR: Unresolved reference: foo // ACTION: Create extension function 'Int.foo' +// ACTION: Do not show return expression hints // ACTION: Replace infix call with ordinary call // WITH_STDLIB fun refer() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inClass.kt index 9f2b6bc746da..451eccc1485d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inClass.kt @@ -1,10 +1,11 @@ // "Create local variable 'foo'" "false" -// ACTION: Convert to lazy property // ACTION: Convert property initializer to getter +// ACTION: Convert to lazy property // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' -// ACTION: Rename reference +// ACTION: Do not show return expression hints // ACTION: Move to constructor +// ACTION: Rename reference // ERROR: Unresolved reference: foo class A { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValue.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValue.kt index 1f2f12d78f26..0111ba0aa021 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValue.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValue.kt @@ -3,6 +3,7 @@ // ACTION: Create parameter 'abc' // ACTION: Create property 'abc' // ACTION: Create property 'abc' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ERROR: Unresolved reference: abc diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValueLocalFun.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValueLocalFun.kt index 2670deb5d602..fb06e06d2522 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValueLocalFun.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValueLocalFun.kt @@ -2,6 +2,7 @@ // ACTION: Add '@JvmOverloads' annotation to function 'testMethod' // ACTION: Create local variable 'abc' // ACTION: Create parameter 'abc' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValueLocalFun.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValueLocalFun.kt.after index 117d300df882..d91cd783420a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValueLocalFun.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inDefaultValueLocalFun.kt.after @@ -2,6 +2,7 @@ // ACTION: Add '@JvmOverloads' annotation to function 'testMethod' // ACTION: Create local variable 'abc' // ACTION: Create parameter 'abc' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFun.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFun.kt index 819c6d3e344e..4f3e93eda47e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFun.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFun.kt @@ -2,6 +2,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference fun test(): Int { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFun.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFun.kt.after index 2deec2fc5b33..922ebe9086db 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFun.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFun.kt.after @@ -2,6 +2,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference fun test(): Int { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFunWithExpressionBody.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFunWithExpressionBody.kt index 8ebfd8816d9b..11e8fab0ad76 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFunWithExpressionBody.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFunWithExpressionBody.kt @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference fun test(): Int = foo \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFunWithExpressionBody.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFunWithExpressionBody.kt.after index d94db3bf79fa..5825a4308ee7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFunWithExpressionBody.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inFunWithExpressionBody.kt.after @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference fun test(): Int { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLabelRef.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLabelRef.kt index 164de8685cf4..1f77dbcee7dc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLabelRef.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLabelRef.kt @@ -1,4 +1,5 @@ // "Create local variable 'foo'" "false" +// ACTION: Do not show return expression hints // ERROR: Unresolved reference: @foo fun refer() { val v = this@foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaNoParams.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaNoParams.kt index acd9ccdffc15..5eade3e36c95 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaNoParams.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaNoParams.kt @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaNoParams.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaNoParams.kt.after index 8cbb8f849cf9..ac547a2846b3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaNoParams.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaNoParams.kt.after @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaWithParams.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaWithParams.kt index ae6bfd362809..bc4ca4530f14 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaWithParams.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaWithParams.kt @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaWithParams.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaWithParams.kt.after index bbfa8df643c4..fb03a203dc76 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaWithParams.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaWithParams.kt.after @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaNoParams.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaNoParams.kt index b9d05ec3ce3c..d70ef8826520 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaNoParams.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaNoParams.kt @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaNoParams.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaNoParams.kt.after index a6e57905221b..4a33881953e6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaNoParams.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaNoParams.kt.after @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaWithParams.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaWithParams.kt index da045055be3d..c621d4a54e2c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaWithParams.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaWithParams.kt @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaWithParams.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaWithParams.kt.after index 275be6aa5ed0..8b000ee58b02 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaWithParams.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaWithParams.kt.after @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/localWithPackageName.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/localWithPackageName.kt index 14f670882ef0..0a6552f2bfb5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/localWithPackageName.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/localWithPackageName.kt @@ -2,6 +2,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference package foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/localWithPackageName.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/localWithPackageName.kt.after index 98b2ce20de34..d857dd827fa8 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/localWithPackageName.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/localWithPackageName.kt.after @@ -2,6 +2,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference package foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/nonIdentifier.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/nonIdentifier.kt index f013a6237779..252b6b71a147 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/nonIdentifier.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/nonIdentifier.kt @@ -1,6 +1,7 @@ // "Create local variable '-'" "false" // ACTION: Create extension function 'A.minus' // ACTION: Create member function 'A.minus' +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public inline operator fun BigDecimal.minus(other: BigDecimal): BigDecimal defined in kotlin
public inline operator fun BigInteger.minus(other: BigInteger): BigInteger defined in kotlin
public operator fun Iterable.minus(elements: Array): List defined in kotlin.collections
public operator fun Iterable.minus(elements: Iterable): List defined in kotlin.collections
public operator fun Iterable.minus(elements: Sequence): List defined in kotlin.collections
public operator fun Iterable.minus(element: A): List defined in kotlin.collections
public operator fun Map.minus(keys: Array): Map defined in kotlin.collections
public operator fun Map.minus(keys: Iterable): Map defined in kotlin.collections
public operator fun Map.minus(keys: Sequence): Map defined in kotlin.collections
public operator fun Map.minus(key: A): Map defined in kotlin.collections
public operator fun Set.minus(elements: Array): Set defined in kotlin.collections
public operator fun Set.minus(elements: Iterable): Set defined in kotlin.collections
public operator fun Set.minus(elements: Sequence): Set defined in kotlin.collections
public operator fun Set
.minus(element: A): Set defined in kotlin.collections
public operator fun Sequence.minus(elements: Array): Sequence defined in kotlin.sequences
public operator fun Sequence.minus(elements: Iterable): Sequence defined in kotlin.sequences
public operator fun Sequence.minus(elements: Sequence): Sequence defined in kotlin.sequences
public operator fun Sequence
.minus(element: A): Sequence defined in kotlin.sequences // COMPILER_ARGUMENTS: -XXLanguage:-NewInference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/onTopLevel.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/onTopLevel.kt index c8520eff7a81..2227a47f56c9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/onTopLevel.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/onTopLevel.kt @@ -1,7 +1,8 @@ // "Create local variable 'foo'" "false" -// ACTION: Convert to lazy property // ACTION: Convert property initializer to getter +// ACTION: Convert to lazy property // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/qualifiedInFun.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/qualifiedInFun.kt index 98e676b13303..805d811fb504 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/qualifiedInFun.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/qualifiedInFun.kt @@ -2,6 +2,7 @@ // ACTION: Create extension property 'A.foo' // ACTION: Create member property 'A.foo' // ACTION: Create property 'foo' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/unitTypedInFun.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/unitTypedInFun.kt index 0548d00e02cf..8e8cbcb8dae7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/unitTypedInFun.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/unitTypedInFun.kt @@ -3,6 +3,7 @@ // ACTION: Create object 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ACTION: Split property declaration diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/unitTypedInFun.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/unitTypedInFun.kt.after index abb74f8507d5..0943184e5f4e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/unitTypedInFun.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/unitTypedInFun.kt.after @@ -3,6 +3,7 @@ // ACTION: Create object 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ACTION: Split property declaration diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/assignedInFun.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/assignedInFun.kt index b88a6684eb29..e9c0b8084d4a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/assignedInFun.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/assignedInFun.kt @@ -1,8 +1,9 @@ // "Create parameter 'foo'" "false" +// ACTION: Converts the assignment statement to an expression // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference -// ACTION: Converts the assignment statement to an expression // ERROR: Unresolved reference: foo fun test(n: Int) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/callableRef.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/callableRef.kt index 494d1a6ecce9..eb210cfcfa67 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/callableRef.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/callableRef.kt @@ -1,7 +1,8 @@ // "Create parameter 'foo'" "false" -// ACTION: Rename reference -// ACTION: Create function 'foo' // ACTION: Add 'f =' to argument +// ACTION: Create function 'foo' +// ACTION: Do not show return expression hints +// ACTION: Rename reference // ERROR: Unresolved reference: foo fun test(f: (Int) -> Int) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntryWithSkippedIndex.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntryWithSkippedIndex.kt index bee55275b308..9e307bc227ee 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntryWithSkippedIndex.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntryWithSkippedIndex.kt @@ -1,5 +1,6 @@ // "Create property 'address2' as constructor parameter" "false" // ACTION: Create property 'address' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Introduce import alias // ACTION: Make 'Person' data class diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInClassObject.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInClassObject.kt index 1810fa1b729f..b9ee09a3773a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInClassObject.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInClassObject.kt @@ -1,6 +1,7 @@ // "Create parameter 'foo'" "false" // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInObject.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInObject.kt index 6bc3316491c4..6f71fb42f5c9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInObject.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInObject.kt @@ -1,6 +1,7 @@ // "Create parameter 'foo'" "false" // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInTrait.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInTrait.kt index cde3929fc084..3e4da1dbf06f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInTrait.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInTrait.kt @@ -1,6 +1,7 @@ // "Create parameter 'foo'" "false" -// ACTION: Create local variable 'foo' // ACTION: Create abstract property 'foo' +// ACTION: Create local variable 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorNoClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorNoClass.kt index c14d9c1fbe65..6b346df37ed7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorNoClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorNoClass.kt @@ -1,6 +1,7 @@ // "Create parameter 'foo'" "false" // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inBinaryOperation.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inBinaryOperation.kt index f4319146f70a..c540ce9d8e19 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inBinaryOperation.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inBinaryOperation.kt @@ -1,6 +1,7 @@ // "Create parameter 'foo'" "false" // ERROR: Unresolved reference: foo // ACTION: Create extension function 'Int.foo' +// ACTION: Do not show return expression hints // ACTION: Replace infix call with ordinary call // WITH_STDLIB fun refer() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inClassObjectInitializer.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inClassObjectInitializer.kt index 86eaf8f70de4..7d149cc1b808 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inClassObjectInitializer.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inClassObjectInitializer.kt @@ -1,8 +1,9 @@ // "Create parameter 'foo'" "false" // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' -// ACTION: Split property declaration +// ACTION: Do not show return expression hints // ACTION: Rename reference +// ACTION: Split property declaration // ERROR: Unresolved reference: foo class A { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInClass.kt index 0d781d153152..4621abe4f902 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInClass.kt @@ -1,7 +1,8 @@ // "Create parameter 'foo'" "false" +// ACTION: Create extension property 'T.foo' // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' -// ACTION: Create extension property 'T.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInGenClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInGenClass.kt index 2b9ea8ced805..b1e3db740bf9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInGenClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInGenClass.kt @@ -1,7 +1,8 @@ // "Create parameter 'foo'" "false" +// ACTION: Create extension property 'T.foo' // ACTION: Create local variable 'foo' // ACTION: Create property 'foo' -// ACTION: Create extension property 'T.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLabelRef.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLabelRef.kt index 5a58097aabc3..5b6411960e09 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLabelRef.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLabelRef.kt @@ -1,4 +1,5 @@ // "Create parameter 'foo'" "false" +// ACTION: Do not show return expression hints // ERROR: Unresolved reference: @foo fun refer() { val v = this@foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaNoParams.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaNoParams.kt index 1bd93f888d3e..f1c3d216f8d0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaNoParams.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaNoParams.kt @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaNoParams.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaNoParams.kt.after index ac1c9b497355..9e2067272eb5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaNoParams.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaNoParams.kt.after @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithIt.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithIt.kt index 137107c7a919..bf78792cfcdb 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithIt.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithIt.kt @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithIt.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithIt.kt.after index 613aea182ac6..cc9272eaa95f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithIt.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithIt.kt.after @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithParams.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithParams.kt index f632a4d6d154..bb4ecccc2659 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithParams.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithParams.kt @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithParams.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithParams.kt.after index eb6ba5d01e3d..f1296013c936 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithParams.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithParams.kt.after @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithTypedParams.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithTypedParams.kt index ae2dfb1f9f0b..15e91c926b0a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithTypedParams.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithTypedParams.kt @@ -4,6 +4,7 @@ // ACTION: Create object 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithTypedParams.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithTypedParams.kt.after index 436a8d49e758..286fba19c9c8 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithTypedParams.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithTypedParams.kt.after @@ -4,6 +4,7 @@ // ACTION: Create object 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inMultiLineLambdaNoParams.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inMultiLineLambdaNoParams.kt index ae3770ebc75e..f313b3aaa644 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inMultiLineLambdaNoParams.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inMultiLineLambdaNoParams.kt @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inMultiLineLambdaNoParams.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inMultiLineLambdaNoParams.kt.after index f3c17b39219c..0329c4284d68 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inMultiLineLambdaNoParams.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inMultiLineLambdaNoParams.kt.after @@ -3,6 +3,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename reference // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInClassObject.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInClassObject.kt index 02d2f348ac94..7ced2a06ce0f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInClassObject.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInClassObject.kt @@ -1,7 +1,8 @@ // "Create parameter 'foo'" "false" -// ACTION: Convert to lazy property // ACTION: Convert property initializer to getter +// ACTION: Convert to lazy property // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInObject.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInObject.kt index 51a3b118de8f..1fce22d71e11 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInObject.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInObject.kt @@ -1,7 +1,8 @@ // "Create parameter 'foo'" "false" -// ACTION: Convert to lazy property // ACTION: Convert property initializer to getter +// ACTION: Convert to lazy property // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerNoClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerNoClass.kt index 1612f1a5bb24..dcf110ac313d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerNoClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerNoClass.kt @@ -1,7 +1,8 @@ // "Create parameter 'foo'" "false" -// ACTION: Convert to lazy property // ACTION: Convert property initializer to getter +// ACTION: Convert to lazy property // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/nonIdentifier.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/nonIdentifier.kt index 4233f32adac9..df150f0115ef 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/nonIdentifier.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/nonIdentifier.kt @@ -1,6 +1,7 @@ // "Create parameter '-'" "false" // ACTION: Create extension function 'A.minus' // ACTION: Create member function 'A.minus' +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public inline operator fun BigDecimal.minus(other: BigDecimal): BigDecimal defined in kotlin
public inline operator fun BigInteger.minus(other: BigInteger): BigInteger defined in kotlin
public operator fun Iterable.minus(elements: Array): List defined in kotlin.collections
public operator fun Iterable.minus(elements: Iterable): List defined in kotlin.collections
public operator fun Iterable.minus(elements: Sequence): List defined in kotlin.collections
public operator fun Iterable
.minus(element: A): List defined in kotlin.collections
public operator fun Map.minus(keys: Array): Map defined in kotlin.collections
public operator fun Map.minus(keys: Iterable): Map defined in kotlin.collections
public operator fun Map.minus(keys: Sequence): Map defined in kotlin.collections
public operator fun Map.minus(key: A): Map defined in kotlin.collections
public operator fun Set.minus(elements: Array): Set defined in kotlin.collections
public operator fun Set.minus(elements: Iterable): Set defined in kotlin.collections
public operator fun Set.minus(elements: Sequence): Set defined in kotlin.collections
public operator fun Set
.minus(element: A): Set defined in kotlin.collections
public operator fun Sequence.minus(elements: Array): Sequence defined in kotlin.sequences
public operator fun Sequence.minus(elements: Iterable): Sequence defined in kotlin.sequences
public operator fun Sequence.minus(elements: Sequence): Sequence defined in kotlin.sequences
public operator fun Sequence
.minus(element: A): Sequence defined in kotlin.sequences // COMPILER_ARGUMENTS: -XXLanguage:-NewInference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/qualifiedInFun.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/qualifiedInFun.kt index b9f47b1faebb..acda86b9fa3c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/qualifiedInFun.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/qualifiedInFun.kt @@ -2,6 +2,7 @@ // ACTION: Create extension property 'A.foo' // ACTION: Create member property 'A.foo' // ACTION: Create property 'foo' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/localValNoReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/localValNoReceiver.kt index 527c7917abe1..b025b6cdf43f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/localValNoReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/localValNoReceiver.kt @@ -1,6 +1,7 @@ // "Create property 'foo' as constructor parameter" "false" -// ACTION: Create parameter 'foo' // ACTION: Create local variable 'foo' +// ACTION: Create parameter 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/objectMemberValNoReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/objectMemberValNoReceiver.kt index d69d34f8b156..0fa5a47a3b91 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/objectMemberValNoReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/objectMemberValNoReceiver.kt @@ -2,6 +2,7 @@ // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' // ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/staticValOnJavaClass.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/staticValOnJavaClass.before.Main.kt index 9052a339a98c..c118e7a3aac5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/staticValOnJavaClass.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/staticValOnJavaClass.before.Main.kt @@ -1,5 +1,6 @@ // "Create member property 'foo' as constructor parameter" "false" // ACTION: Create member property 'J.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/topLevelValNoReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/topLevelValNoReceiver.kt index cec6b603bd49..1968c58d33f4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/topLevelValNoReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/topLevelValNoReceiver.kt @@ -1,7 +1,8 @@ // "Create property 'foo' as constructor parameter" "false" -// ACTION: Create property 'foo' // ACTION: Create local variable 'foo' // ACTION: Create parameter 'foo' +// ACTION: Create property 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnCompanionObject.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnCompanionObject.kt index ea2ce9f800b6..4df1db32f69e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnCompanionObject.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnCompanionObject.kt @@ -1,6 +1,7 @@ // "Create member property 'foo' as constructor parameter" "false" -// ACTION: Create member property 'A.Companion.foo' // ACTION: Create extension property 'A.Companion.foo' +// ACTION: Create member property 'A.Companion.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnJavaType.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnJavaType.before.Main.kt index c143c0e31aaa..9a8ea39c73ee 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnJavaType.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnJavaType.before.Main.kt @@ -1,6 +1,7 @@ // "Create property 'foo' as constructor parameter" "false" // ACTION: Create member property 'A.foo' // ACTION: Create extension property 'A.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnLibType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnLibType.kt index 832143b78550..e7600ac61357 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnLibType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnLibType.kt @@ -1,5 +1,6 @@ // "Create property 'foo' as constructor parameter" "false" // ACTION: Create extension property 'Int.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/abstract/otherExplicitReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/abstract/otherExplicitReceiver.kt index 0279fb092665..215b88a8e9b9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/abstract/otherExplicitReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/abstract/otherExplicitReceiver.kt @@ -1,9 +1,10 @@ // "Create abstract property 'foo'" "false" +// ACTION: Add 'b =' to argument // ACTION: Create extension property 'B.foo' // ACTION: Create member property 'B.foo' // ACTION: Create property 'foo' as constructor parameter +// ACTION: Do not show return expression hints // ACTION: Rename reference -// ACTION: Add 'b =' to argument // ERROR: Unresolved reference: foo abstract class A { fun bar(b: Boolean) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callOnUserType.kt index e188c075ccf4..e052cae321a5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callOnUserType.kt @@ -1,6 +1,7 @@ // "Create property 'foo'" "false" // ACTION: Create extension function 'A.bar' // ACTION: Create member function 'A.bar' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: bar // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callableRef.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callableRef.kt index 93fcc1d4db47..9b22c3cc3ad4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callableRef.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callableRef.kt @@ -1,7 +1,8 @@ // "Create property 'foo'" "false" -// ACTION: Rename reference -// ACTION: Create function 'foo' // ACTION: Add 'f =' to argument +// ACTION: Create function 'foo' +// ACTION: Do not show return expression hints +// ACTION: Rename reference // ERROR: Unresolved reference: foo fun test(f: (Int) -> Int) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/extensionRefInImport.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/extensionRefInImport.kt index 5a5d6a4abcb7..bf805886a29b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/extensionRefInImport.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/extensionRefInImport.kt @@ -1,4 +1,5 @@ // "Create extension property 'foo'" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/inBinaryOperation.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/inBinaryOperation.kt index 67410a2fbb2f..71ea1e562fd8 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/inBinaryOperation.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/inBinaryOperation.kt @@ -1,6 +1,7 @@ // "Create property 'foo'" "false" // ERROR: Unresolved reference: foo // ACTION: Create extension function 'Int.foo' +// ACTION: Do not show return expression hints // ACTION: Replace infix call with ordinary call // WITH_STDLIB fun refer() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/inLabelRef.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/inLabelRef.kt index 733acdd550f1..ed3a905448f3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/inLabelRef.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/inLabelRef.kt @@ -1,4 +1,5 @@ // "Create property 'foo'" "false" +// ACTION: Do not show return expression hints // ERROR: Unresolved reference: @foo fun refer() { val v = this@foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/localValNoReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/localValNoReceiver.kt index cddb7e46634e..f371381a7288 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/localValNoReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/localValNoReceiver.kt @@ -1,6 +1,7 @@ // "Create property 'foo'" "false" -// ACTION: Create parameter 'foo' // ACTION: Create local variable 'foo' +// ACTION: Create parameter 'foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/memberWithTypeParameterAsReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/memberWithTypeParameterAsReceiver.kt index 5f0e7836b85f..4a7ef1356a5e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/memberWithTypeParameterAsReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/memberWithTypeParameterAsReceiver.kt @@ -1,7 +1,8 @@ // "Create member property 'bar'" "false" -// ACTION: Create extension property 'T.bar' -// ACTION: Rename reference // ACTION: Add 'n =' to argument +// ACTION: Create extension property 'T.bar' +// ACTION: Do not show return expression hints +// ACTION: Rename reference // ERROR: Unresolved reference: bar fun consume(n: Int) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/refInImport.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/refInImport.kt index 3b1c01c9459e..d7f337a9f892 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/refInImport.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/refInImport.kt @@ -1,4 +1,5 @@ // "Create property 'foo'" "false" +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/staticExtensionValOnJavaType.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/staticExtensionValOnJavaType.before.Main.kt index a26c34fe3d6f..31d58039036e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/staticExtensionValOnJavaType.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/staticExtensionValOnJavaType.before.Main.kt @@ -1,5 +1,6 @@ // "Create extension property 'foo'" "false" // ACTION: Create member property 'J.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/staticVarOnJavaInterface.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/staticVarOnJavaInterface.before.Main.kt index 8258bab524b8..dc7269e9af1e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/staticVarOnJavaInterface.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/staticVarOnJavaInterface.before.Main.kt @@ -1,5 +1,6 @@ // "Create property 'foo'" "false" // ACTION: Rename reference +// ACTION: Do not show return expression hints // ACTION: Converts the assignment statement to an expression // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/valOnGroovyType.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/valOnGroovyType.before.Main.kt index 16337a1fa3ee..a10a3ad060b5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/valOnGroovyType.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/valOnGroovyType.before.Main.kt @@ -1,5 +1,6 @@ // "Create property 'foo'" "false" // ACTION: Create extension property 'A.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/valOnJavaInterface.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/valOnJavaInterface.before.Main.kt index 28e1be274db5..817a01ddbcda 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/valOnJavaInterface.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/valOnJavaInterface.before.Main.kt @@ -1,5 +1,6 @@ // "Create property 'foo'" "false" // ACTION: Create extension property 'A.foo' +// ACTION: Do not show return expression hints // ACTION: Rename reference // ERROR: Unresolved reference: foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createLabel/breakInlambdaBeforeLoop.kt b/plugins/kotlin/idea/tests/testData/quickfix/createLabel/breakInlambdaBeforeLoop.kt index f9a23b860a40..1a4c5e2cdb6f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createLabel/breakInlambdaBeforeLoop.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createLabel/breakInlambdaBeforeLoop.kt @@ -1,4 +1,5 @@ // "Create label foo@" "false" +// ACTION: Do not show return expression hints // ERROR: The label '@foo' does not denote a loop // ERROR: Unresolved reference: @foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createLabel/breakNoLoop.kt b/plugins/kotlin/idea/tests/testData/quickfix/createLabel/breakNoLoop.kt index 410e5f76703f..373dcad85218 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createLabel/breakNoLoop.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createLabel/breakNoLoop.kt @@ -1,4 +1,5 @@ // "Create label foo@" "false" +// ACTION: Do not show return expression hints // ERROR: The label '@foo' does not denote a loop // ERROR: Unresolved reference: @foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createLabel/continueNoLoop.kt b/plugins/kotlin/idea/tests/testData/quickfix/createLabel/continueNoLoop.kt index 8e11684aa28d..7080d2818ccb 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createLabel/continueNoLoop.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createLabel/continueNoLoop.kt @@ -1,4 +1,5 @@ // "Create label foo@" "false" +// ACTION: Do not show return expression hints // ERROR: The label '@foo' does not denote a loop // ERROR: Unresolved reference: @foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createLabel/returnNoLambda.kt b/plugins/kotlin/idea/tests/testData/quickfix/createLabel/returnNoLambda.kt index 942ed230d839..1558f892c765 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createLabel/returnNoLambda.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createLabel/returnNoLambda.kt @@ -1,4 +1,5 @@ // "Create label foo@" "false" +// ACTION: Do not show return expression hints // ERROR: Unresolved reference: @foo fun test(): Int { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReceiverType.kt b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReceiverType.kt index 6c82a3fd5d7d..b65fa9f44942 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReceiverType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReceiverType.kt @@ -1,5 +1,6 @@ // "Make 'foo' private" "false" // ACTION: Convert receiver to parameter +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Private' protected // ACTION: Make 'Private' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClass.kt index 293a693b9972..1e5bc2e2e5db 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClass.kt @@ -2,6 +2,7 @@ // ACTION: Add full qualifier // ACTION: Add names to call arguments // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Data' protected // ACTION: Make 'Data' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClass.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClass.kt.after index 31b78ed4208d..95d22a610312 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClass.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClass.kt.after @@ -2,6 +2,7 @@ // ACTION: Add full qualifier // ACTION: Add names to call arguments // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Data' protected // ACTION: Make 'Data' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedBase.kt b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedBase.kt index 8520fc1a23e5..0d3c09bc116f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedBase.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedBase.kt @@ -1,6 +1,7 @@ // "Make 'First' private" "true" // ACTION: Add names to call arguments // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Data' public // ACTION: Make 'First' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedBase.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedBase.kt.after index f79f5766ca08..1e41bb48e285 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedBase.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedBase.kt.after @@ -1,6 +1,7 @@ // "Make 'First' private" "true" // ACTION: Add names to call arguments // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Data' public // ACTION: Make 'First' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterface.kt b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterface.kt index 9839bb718a6e..b28115d234ae 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterface.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterface.kt @@ -1,5 +1,6 @@ // "Make 'Derived' internal" "true" // ACTION: Add full qualifier +// ACTION: Do not show return expression hints // ACTION: Implement interface // ACTION: Introduce import alias // ACTION: Make 'Derived' internal diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterface.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterface.kt.after index 832332d58c1e..efaa196bbe0a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterface.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterface.kt.after @@ -1,5 +1,6 @@ // "Make 'Derived' internal" "true" // ACTION: Add full qualifier +// ACTION: Do not show return expression hints // ACTION: Implement interface // ACTION: Introduce import alias // ACTION: Make 'Derived' internal diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterfacePrivate.kt b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterfacePrivate.kt index 20b8c3d19317..d3a9d757f487 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterfacePrivate.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterfacePrivate.kt @@ -1,5 +1,6 @@ // "Make 'Derived' private" "true" // ACTION: Add full qualifier +// ACTION: Do not show return expression hints // ACTION: Implement interface // ACTION: Introduce import alias // ACTION: Make 'Derived' internal diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterfacePrivate.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterfacePrivate.kt.after index cf6379065653..9807f595ee36 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterfacePrivate.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedSuperInterfacePrivate.kt.after @@ -1,5 +1,6 @@ // "Make 'Derived' private" "true" // ACTION: Add full qualifier +// ACTION: Do not show return expression hints // ACTION: Implement interface // ACTION: Introduce import alias // ACTION: Make 'Derived' internal diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeInAnnotation.kt b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeInAnnotation.kt index fc9920ff2c48..1ccc5af9bcd7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeInAnnotation.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeInAnnotation.kt @@ -1,5 +1,6 @@ // "Make '' internal" "false" // DISABLE-ERRORS +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Introduce import alias // ACTION: Make 'My' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBound.kt b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBound.kt index e93e6fdeffee..16c8b597bbad 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBound.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBound.kt @@ -1,5 +1,6 @@ // "Make 'User' internal" "true" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Introduce import alias // ACTION: Make 'InternalString' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBound.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBound.kt.after index 888b12ada23c..80e9772e9270 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBound.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBound.kt.after @@ -1,5 +1,6 @@ // "Make 'User' internal" "true" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Introduce import alias // ACTION: Make 'InternalString' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBoundNested.kt b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBoundNested.kt index da8513796cfd..314b14658265 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBoundNested.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedTypeParameterBoundNested.kt @@ -1,5 +1,6 @@ // "Make 'PrivateInFileClass' private" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Import members from 'PrivateInFileClass' // ACTION: Introduce import alias diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/javaDeprecated.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/javaDeprecated.before.Main.kt index d36771260612..dcdeaccfe282 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/javaDeprecated.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/javaDeprecated.before.Main.kt @@ -4,7 +4,7 @@ // ACTION: Convert to with // ACTION: Convert to also // ACTION: Convert to apply - +// ACTION: Do not show return expression hints fun foo() { val c = JavaClass() c.oldFun() diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/compoundWithDeprecatedArgumentsAndConstructor.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/compoundWithDeprecatedArgumentsAndConstructor.kt index 7dda807b0f66..a38b7a19eb22 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/compoundWithDeprecatedArgumentsAndConstructor.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/compoundWithDeprecatedArgumentsAndConstructor.kt @@ -1,6 +1,7 @@ // "Replace with 'New'" "false" // ACTION: Compiler warning 'TYPEALIAS_EXPANSION_DEPRECATION' options // ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Remove explicit type specification diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/conflictOnTypeAndAlias.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/conflictOnTypeAndAlias.kt index 18c04ece7b59..2a39f8e01ba1 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/conflictOnTypeAndAlias.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/conflictOnTypeAndAlias.kt @@ -1,5 +1,6 @@ // "Replace with 'NewClass'" "false" // ACTION: Compiler warning 'TYPEALIAS_EXPANSION_DEPRECATION' options +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Introduce local variable // ACTION: Replace usages of 'typealias Old = OldClass' in whole project diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveFromClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveFromClass.kt index 7e613d081607..6f91a58c18e0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveFromClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveFromClass.kt @@ -1,6 +1,7 @@ // "Replace with 'NewClass'" "false" // ACTION: Compiler warning 'TYPEALIAS_EXPANSION_DEPRECATION' options // ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Remove explicit type specification diff --git a/plugins/kotlin/idea/tests/testData/quickfix/experimental/basicFunctionNotApplicable.kt b/plugins/kotlin/idea/tests/testData/quickfix/experimental/basicFunctionNotApplicable.kt index 30b9700e48f2..0b1044b615b4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/experimental/basicFunctionNotApplicable.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/experimental/basicFunctionNotApplicable.kt @@ -1,11 +1,12 @@ // "Propagate 'MyExperimentalAPI' opt-in requirement to 'bar'" "false" // COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn // WITH_STDLIB -// ACTION: Propagate 'MyExperimentalAPI' opt-in requirement to containing class 'Bar' +// ACTION: Add '-opt-in=MyExperimentalAPI' to module light_idea_test_case compiler arguments +// ACTION: Do not show return expression hints +// ACTION: Opt in for 'MyExperimentalAPI' in containing file 'basicFunctionNotApplicable.kt' // ACTION: Opt in for 'MyExperimentalAPI' on 'bar' // ACTION: Opt in for 'MyExperimentalAPI' on containing class 'Bar' -// ACTION: Opt in for 'MyExperimentalAPI' in containing file 'basicFunctionNotApplicable.kt' -// ACTION: Add '-opt-in=MyExperimentalAPI' to module light_idea_test_case compiler arguments +// ACTION: Propagate 'MyExperimentalAPI' opt-in requirement to containing class 'Bar' // ERROR: This declaration needs opt-in. Its usage must be marked with '@MyExperimentalAPI' or '@OptIn(MyExperimentalAPI::class)' // ERROR: This declaration needs opt-in. Its usage must be marked with '@MyExperimentalAPI' or '@OptIn(MyExperimentalAPI::class)' // ERROR: This annotation is not applicable to target 'member function' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/experimental/experimentalUnused.kt b/plugins/kotlin/idea/tests/testData/quickfix/experimental/experimentalUnused.kt index 98c7363ba588..b2377d279aaf 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/experimental/experimentalUnused.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/experimental/experimentalUnused.kt @@ -1,6 +1,7 @@ // "Safe delete 'Marker'" "false" // COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn -opt-in=test.Marker // WITH_STDLIB +// ACTION: Do not show return expression hints // ACTION: Rename file to Marker.kt // TOOL: org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection diff --git a/plugins/kotlin/idea/tests/testData/quickfix/experimental/localVariableNoGetterAction.kt b/plugins/kotlin/idea/tests/testData/quickfix/experimental/localVariableNoGetterAction.kt index 9f65c6500506..e73f06526e37 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/experimental/localVariableNoGetterAction.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/experimental/localVariableNoGetterAction.kt @@ -1,6 +1,7 @@ // "Move '@SomeOptInAnnotation' annotation from getter to property" "false" // COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn // WITH_STDLIB +// ACTION: Do not show return expression hints // ACTION: Remove annotation // ERROR: Opt-in requirement marker annotation cannot be used on variable diff --git a/plugins/kotlin/idea/tests/testData/quickfix/experimental/nestedClasses.kt b/plugins/kotlin/idea/tests/testData/quickfix/experimental/nestedClasses.kt index aa5b97c51ef9..38f270a2b97a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/experimental/nestedClasses.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/experimental/nestedClasses.kt @@ -1,13 +1,14 @@ // "Propagate 'MyExperimentalAPI' opt-in requirement to containing class 'Outer'" "false" // COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn // WITH_STDLIB -// ACTION: Propagate 'MyExperimentalAPI' opt-in requirement to 'bar' -// ACTION: Propagate 'MyExperimentalAPI' opt-in requirement to containing class 'Inner' +// ACTION: Add '-opt-in=MyExperimentalAPI' to module light_idea_test_case compiler arguments +// ACTION: Do not show return expression hints +// ACTION: Introduce import alias +// ACTION: Opt in for 'MyExperimentalAPI' in containing file 'nestedClasses.kt' // ACTION: Opt in for 'MyExperimentalAPI' on 'bar' // ACTION: Opt in for 'MyExperimentalAPI' on containing class 'Inner' -// ACTION: Opt in for 'MyExperimentalAPI' in containing file 'nestedClasses.kt' -// ACTION: Add '-opt-in=MyExperimentalAPI' to module light_idea_test_case compiler arguments -// ACTION: Introduce import alias +// ACTION: Propagate 'MyExperimentalAPI' opt-in requirement to 'bar' +// ACTION: Propagate 'MyExperimentalAPI' opt-in requirement to containing class 'Inner' // ERROR: This declaration needs opt-in. Its usage must be marked with '@MyExperimentalAPI' or '@OptIn(MyExperimentalAPI::class)' @RequiresOptIn diff --git a/plugins/kotlin/idea/tests/testData/quickfix/experimental/override.kt b/plugins/kotlin/idea/tests/testData/quickfix/experimental/override.kt index 7b43cb84d7dc..75c19f2d8986 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/experimental/override.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/experimental/override.kt @@ -1,13 +1,14 @@ // "Propagate 'MyExperimentalAPI' opt-in requirement to containing class 'Derived'" "false" // COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn // WITH_STDLIB -// ACTION: Propagate 'MyExperimentalAPI' opt-in requirement to 'foo' +// ACTION: Add '-opt-in=MyExperimentalAPI' to module light_idea_test_case compiler arguments +// ACTION: Do not show return expression hints +// ACTION: Enable a trailing comma by default in the formatter +// ACTION: Go To Super Method // ACTION: Opt in for 'MyExperimentalAPI' in containing file 'override.kt' // ACTION: Opt in for 'MyExperimentalAPI' on 'foo' // ACTION: Opt in for 'MyExperimentalAPI' on containing class 'Derived' -// ACTION: Add '-opt-in=MyExperimentalAPI' to module light_idea_test_case compiler arguments -// ACTION: Enable a trailing comma by default in the formatter -// ACTION: Go To Super Method +// ACTION: Propagate 'MyExperimentalAPI' opt-in requirement to 'foo' // ERROR: Base declaration of supertype 'Base' needs opt-in. The declaration override must be annotated with '@MyExperimentalAPI' or '@OptIn(MyExperimentalAPI::class)' @RequiresOptIn diff --git a/plugins/kotlin/idea/tests/testData/quickfix/experimental/typeAlias.kt b/plugins/kotlin/idea/tests/testData/quickfix/experimental/typeAlias.kt index 3ab9ffbbc0ef..076e545ee42d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/experimental/typeAlias.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/experimental/typeAlias.kt @@ -2,6 +2,7 @@ // COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn // WITH_STDLIB // ACTION: Add '-opt-in=AliasMarker' to module light_idea_test_case compiler arguments +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Opt in for 'AliasMarker' in containing file 'typeAlias.kt' // ACTION: Opt in for 'AliasMarker' on 'AliasMarkerUsage' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/experimental/typeAlias.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/experimental/typeAlias.kt.after index d0a31daea426..f54da465ebfe 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/experimental/typeAlias.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/experimental/typeAlias.kt.after @@ -2,6 +2,7 @@ // COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn // WITH_STDLIB // ACTION: Add '-opt-in=AliasMarker' to module light_idea_test_case compiler arguments +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Opt in for 'AliasMarker' in containing file 'typeAlias.kt' // ACTION: Opt in for 'AliasMarker' on 'AliasMarkerUsage' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasComment.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasComment.kt index a94d65ad248b..6393fe74de19 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasComment.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasComment.kt @@ -1,14 +1,15 @@ // "Remove braces" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.FunctionWithLambdaExpressionBodyInspection // ACTION: Convert property getter to initializer +// ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to run { ... } +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature // ACTION: Specify type explicitly // ACTION: Specify type explicitly -// ACTION: Convert to anonymous function val test get() = { // comment "" diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasMultiStatements.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasMultiStatements.kt index 63e26eb4839e..9ef77444cb6e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasMultiStatements.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasMultiStatements.kt @@ -1,14 +1,15 @@ // "Remove braces" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.FunctionWithLambdaExpressionBodyInspection // ACTION: Convert property getter to initializer +// ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to run { ... } +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature // ACTION: Specify type explicitly // ACTION: Specify type explicitly -// ACTION: Convert to anonymous function val test get() = { foo() foo() diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasNoStatement.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasNoStatement.kt index 0c4086efe57e..568ff40d629c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasNoStatement.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasNoStatement.kt @@ -1,13 +1,14 @@ // "Remove braces" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.FunctionWithLambdaExpressionBodyInspection // ACTION: Convert property getter to initializer +// ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to multi-line lambda // ACTION: Convert to run { ... } +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature // ACTION: Specify type explicitly // ACTION: Specify type explicitly -// ACTION: Convert to anonymous function val test get() = {} \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterIsUsed.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterIsUsed.kt index c8f150780af2..5caf5f28ee5d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterIsUsed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterIsUsed.kt @@ -1,14 +1,15 @@ // "Remove braces" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.FunctionWithLambdaExpressionBodyInspection // ACTION: Convert property getter to initializer +// ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to multi-line lambda +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature // ACTION: Specify type explicitly // ACTION: Specify type explicitly -// ACTION: Convert to anonymous function val test get() = { "" } fun foo() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/getterIsUsed.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/getterIsUsed.kt index a5866507f2a4..3c1eaee27ae0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/getterIsUsed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/getterIsUsed.kt @@ -1,14 +1,15 @@ // "Convert to run { ... }" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.FunctionWithLambdaExpressionBodyInspection // ACTION: Convert property getter to initializer +// ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to multi-line lambda +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature // ACTION: Specify type explicitly // ACTION: Specify type explicitly -// ACTION: Convert to anonymous function val test get() = { "" } fun foo() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/implement/annotation.kt b/plugins/kotlin/idea/tests/testData/quickfix/implement/annotation.kt index 33abe32400e1..c4b34b01d28b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/implement/annotation.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/implement/annotation.kt @@ -1,4 +1,5 @@ // "Create subclass" "false" +// ACTION: Do not show return expression hints // ACTION: Rename file to My.kt annotation class My(val x: Int) diff --git a/plugins/kotlin/idea/tests/testData/quickfix/implement/enum.kt b/plugins/kotlin/idea/tests/testData/quickfix/implement/enum.kt index 58aed637ba46..6d5b28b26336 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/implement/enum.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/implement/enum.kt @@ -1,6 +1,7 @@ // "Create subclass" "false" -// ACTION: Create test // ACTION: Convert to sealed class +// ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Rename file to My.kt enum class My { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/implement/finalClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/implement/finalClass.kt index e85a7cdbf9cb..953e816ba671 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/implement/finalClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/implement/finalClass.kt @@ -1,5 +1,6 @@ // "Create subclass" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Rename file to Base.kt class Base \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/importAlias/simple.kt b/plugins/kotlin/idea/tests/testData/quickfix/importAlias/simple.kt index 971bd6c2979d..fc83ab908e34 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/importAlias/simple.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/importAlias/simple.kt @@ -2,6 +2,7 @@ // WITH_STDLIB // ACTION: Add explicit type arguments // ACTION: Convert to 'forEachIndexed' +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Replace with a 'for' loop fun foo() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/importAlias/simple.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/importAlias/simple.kt.after index 9864f3b31072..2cdf168a0356 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/importAlias/simple.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/importAlias/simple.kt.after @@ -4,6 +4,7 @@ import kotlin.collections.forEach as forEach1 // WITH_STDLIB // ACTION: Add explicit type arguments // ACTION: Convert to 'forEachIndexed' +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Replace with a 'for' loop fun foo() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/importAlias/unresolvedReference.kt b/plugins/kotlin/idea/tests/testData/quickfix/importAlias/unresolvedReference.kt index adb1f67ed90e..a5131a07c594 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/importAlias/unresolvedReference.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/importAlias/unresolvedReference.kt @@ -1,4 +1,5 @@ // "Introduce import alias" "false" +// ACTION: Do not show return expression hints // WITH_STDLIB // ERROR: Overload resolution ambiguity:
public inline fun Iterable.forEach(action: (TypeVariable(T)) -> Unit): Unit defined in kotlin.collections
public inline fun Map.forEach(action: (Map.Entry) -> Unit): Unit defined in kotlin.collections // ERROR: Unresolved reference: a diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReceiverType.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReceiverType.kt index 69205c36c891..cdbc10bda489 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReceiverType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReceiverType.kt @@ -1,5 +1,6 @@ // "Make 'Private' protected" "true" // ACTION: Convert receiver to parameter +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Private' protected // ACTION: Make 'Private' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReceiverType.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReceiverType.kt.after index 8fbbb6800734..c374d70b384e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReceiverType.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReceiverType.kt.after @@ -1,5 +1,6 @@ // "Make 'Private' protected" "true" // ACTION: Convert receiver to parameter +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Private' protected // ACTION: Make 'Private' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClass.kt index d79da14c6199..c5736067abfe 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClass.kt @@ -2,6 +2,7 @@ // ACTION: Add full qualifier // ACTION: Add names to call arguments // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Data' protected // ACTION: Make 'Data' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClass.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClass.kt.after index 1a38ebfb0db7..4ff6b1e36a32 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClass.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClass.kt.after @@ -2,6 +2,7 @@ // ACTION: Add full qualifier // ACTION: Add names to call arguments // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Data' protected // ACTION: Make 'Data' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClassProtectedBase.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClassProtectedBase.kt index 0024ff98b5b1..3a3418bb5554 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClassProtectedBase.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClassProtectedBase.kt @@ -1,6 +1,7 @@ // "Make 'Data' public" "true" // ACTION: Add names to call arguments // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Data' public // ACTION: Make 'First' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClassProtectedBase.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClassProtectedBase.kt.after index 4cd755d2fa76..fc28db08a711 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClassProtectedBase.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperClassProtectedBase.kt.after @@ -1,6 +1,7 @@ // "Make 'Data' public" "true" // ACTION: Add names to call arguments // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'Data' public // ACTION: Make 'First' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperInterface.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperInterface.kt index 714485c3427d..3868edf792a9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperInterface.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperInterface.kt @@ -1,5 +1,6 @@ // "Make 'Outer' public" "true" // ACTION: Add full qualifier +// ACTION: Do not show return expression hints // ACTION: Implement interface // ACTION: Introduce import alias // ACTION: Make 'Derived' internal diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperInterface.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperInterface.kt.after index 35900c877e48..620210cb32b4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperInterface.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedSuperInterface.kt.after @@ -1,5 +1,6 @@ // "Make 'Outer' public" "true" // ACTION: Add full qualifier +// ACTION: Do not show return expression hints // ACTION: Implement interface // ACTION: Introduce import alias // ACTION: Make 'Derived' internal diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBound.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBound.kt index 45687ccd822c..7e9a7028dead 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBound.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBound.kt @@ -1,5 +1,6 @@ // "Make 'InternalString' public" "true" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Introduce import alias // ACTION: Make 'InternalString' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBound.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBound.kt.after index 7c33bf4b3118..45dc822dac2c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBound.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBound.kt.after @@ -1,5 +1,6 @@ // "Make 'InternalString' public" "true" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Introduce import alias // ACTION: Make 'InternalString' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBoundNested.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBoundNested.kt index 1434eae7e723..80f653f30b24 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBoundNested.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBoundNested.kt @@ -1,5 +1,6 @@ // "Make 'PrivateInnerClass' public" "true" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Import members from 'PrivateInFileClass' // ACTION: Introduce import alias diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBoundNested.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBoundNested.kt.after index fdd7a084314e..93e7a89033aa 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBoundNested.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedTypeParameterBoundNested.kt.after @@ -1,5 +1,6 @@ // "Make 'PrivateInnerClass' public" "true" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Import members from 'PrivateInFileClass' // ACTION: Introduce import alias diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invalidSealedClassInheritance.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invalidSealedClassInheritance.kt index f03c06827978..7b294d0141ca 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invalidSealedClassInheritance.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invalidSealedClassInheritance.kt @@ -1,5 +1,6 @@ // "Make '' public" "false" // "Make '' internal" "false" +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ERROR: This type is sealed, so it can be inherited by only its own nested classes or objects diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invisibleFake/methodToNotProtected.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invisibleFake/methodToNotProtected.kt index 5eecc54a17ba..fad6e79c70a0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invisibleFake/methodToNotProtected.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invisibleFake/methodToNotProtected.kt @@ -1,6 +1,7 @@ // "Make 'doSth' protected" "false" -// ACTION: Make 'doSth' public +// ACTION: Do not show return expression hints // ACTION: Make 'doSth' internal +// ACTION: Make 'doSth' public // ERROR: Cannot access 'doSth': it is private in 'A' class A { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invisibleFake/propertyToNotProtected.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invisibleFake/propertyToNotProtected.kt index 9b0d3b743e75..5c1f04336a4b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invisibleFake/propertyToNotProtected.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/invisibleFake/propertyToNotProtected.kt @@ -1,7 +1,8 @@ // "Make 'foo' protected" "false" -// ACTION: Make 'foo' public -// ACTION: Make 'foo' internal +// ACTION: Do not show return expression hints // ACTION: Introduce local variable +// ACTION: Make 'foo' internal +// ACTION: Make 'foo' public // ERROR: Cannot access 'foo': it is private in 'A' class A { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt index e483b3a32527..b8b31db7623a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt @@ -1,7 +1,8 @@ // "Make bar internal" "false" -// ACTION: Convert to lazy property -// ACTION: Convert property initializer to getter // ACTION: Add names to call arguments +// ACTION: Convert property initializer to getter +// ACTION: Convert to lazy property +// ACTION: Do not show return expression hints // ACTION: Move to constructor // ERROR: Cannot access 'bar': it is private in 'First' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSealedClassInheritance.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSealedClassInheritance.kt index 263fa9c2f660..0053e05c621e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSealedClassInheritance.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSealedClassInheritance.kt @@ -1,5 +1,6 @@ // "Make 'SealedClass' public" "true" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'SealedClass' public // ACTION: Make 'Test' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSealedClassInheritance.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSealedClassInheritance.kt.after index 89a643b05f62..2c9946b35641 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSealedClassInheritance.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSealedClassInheritance.kt.after @@ -1,5 +1,6 @@ // "Make 'SealedClass' public" "true" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Make 'SealedClass' public // ACTION: Make 'Test' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToInternal.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToInternal.kt index 2288d7625f73..a6ab07ed3dd6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToInternal.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToInternal.kt @@ -1,5 +1,6 @@ // "Make '' internal" "true" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ACTION: Make '' internal // ACTION: Make '' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToInternal.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToInternal.kt.after index db12f58dd9c4..087360568399 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToInternal.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToInternal.kt.after @@ -1,5 +1,6 @@ // "Make '' internal" "true" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ACTION: Make '' internal // ACTION: Make '' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToPublic.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToPublic.kt index c2e3c8a3556d..c2208754968d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToPublic.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToPublic.kt @@ -1,5 +1,6 @@ // "Make '' public" "true" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ACTION: Make '' internal // ACTION: Make '' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToPublic.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToPublic.kt.after index 5c0b575499c7..41d779abc32b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToPublic.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateSetterToPublic.kt.after @@ -1,5 +1,6 @@ // "Make '' public" "true" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ACTION: Make '' internal // ACTION: Make '' public diff --git a/plugins/kotlin/idea/tests/testData/quickfix/memberVisibilityCanBePrivate/getter.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/memberVisibilityCanBePrivate/getter.before.Main.kt index 80e2d21a35e9..79af02fde07b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/memberVisibilityCanBePrivate/getter.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/memberVisibilityCanBePrivate/getter.before.Main.kt @@ -1,6 +1,7 @@ // "Add 'private' modifier" "false" // ACTION: Convert to secondary constructor // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Move to class body diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/varInsteadOfVal.kt b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/varInsteadOfVal.kt index 8b3870a6783a..936f80ab06a1 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/varInsteadOfVal.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/varInsteadOfVal.kt @@ -1,5 +1,6 @@ // "Delete redundant extension property" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification import java.io.File diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongExplicitThis.kt b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongExplicitThis.kt index bd61670a9d9b..ef3ef6e5234c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongExplicitThis.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongExplicitThis.kt @@ -1,5 +1,6 @@ // "Delete redundant extension property" "false" // ACTION: Convert property to function +// ACTION: Do not show return expression hints // ACTION: Move to companion object // ACTION: Remove explicit type specification diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongExplicitThis2.kt b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongExplicitThis2.kt index 2f77a17b8d86..9b6245919fe3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongExplicitThis2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongExplicitThis2.kt @@ -1,4 +1,5 @@ // "Delete redundant extension property" "false" +// ACTION: Do not show return expression hints // ACTION: Move to companion object // ACTION: Remove explicit type specification diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongGetter.kt b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongGetter.kt index 81e1575e5547..ea9a370302ba 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongGetter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongGetter.kt @@ -1,5 +1,6 @@ // "Delete redundant extension property" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification var Thread.priority: Int diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongGetter2.kt b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongGetter2.kt index 6eaf5f56bda6..c2d4d60a6270 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongGetter2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongGetter2.kt @@ -1,6 +1,7 @@ // "Delete redundant extension property" "false" // ACTION: Convert property to function // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification import java.io.File diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongSetter.kt b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongSetter.kt index 14ce3fe1d2ae..2f41a481d446 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongSetter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/conflictingExtension/wrongSetter.kt @@ -1,5 +1,6 @@ // "Delete redundant extension property" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Remove explicit type specification var Thread.priority: Int diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/jsExternal/nestedExtension01.kt b/plugins/kotlin/idea/tests/testData/quickfix/migration/jsExternal/nestedExtension01.kt index 0905b521d675..c2786f48f0f3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/jsExternal/nestedExtension01.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/jsExternal/nestedExtension01.kt @@ -1,6 +1,7 @@ // "Fix with 'asDynamic'" "false" // JS // ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Move to companion object // ACTION: Remove explicit type specification // ERROR: Declaration of such kind (extension function) can't be external diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaSupertype.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaSupertype.before.Main.kt index 50193f727f1b..bc80776e872f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaSupertype.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaSupertype.before.Main.kt @@ -1,5 +1,6 @@ // "class org.jetbrains.kotlin.idea.quickfix.AddModifierFix" "false" // ERROR: This type is final, so it cannot be inherited from // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Introduce import alias class foo : JavaClass() {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaUpperBound.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaUpperBound.before.Main.kt index c14b4754ce8e..e81791ca49cf 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaUpperBound.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaUpperBound.before.Main.kt @@ -1,6 +1,7 @@ // "class org.jetbrains.kotlin.idea.quickfix.AddModifierFix" "false" // ACTION: Convert to secondary constructor // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Inline type parameter // ACTION: Introduce import alias diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedAnnotationClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedAnnotationClass.kt index 32d1c1e4ca9f..bfe0d32b934e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedAnnotationClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedAnnotationClass.kt @@ -1,4 +1,5 @@ // "Add 'inner' modifier" "false" +// ACTION: Do not show return expression hints // ERROR: Annotation class is not allowed here class A() { inner class B() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedDataClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedDataClass.kt index eb8b2b4fe0b6..cb659b7d1d38 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedDataClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedDataClass.kt @@ -1,5 +1,6 @@ // "Add 'inner' modifier" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ERROR: Class is not allowed here // ERROR: Data class must have at least one primary constructor parameter class A() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedEnumClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedEnumClass.kt index a4994f62fbe2..affcd81d5ee9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedEnumClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedEnumClass.kt @@ -1,6 +1,7 @@ // "Add 'inner' modifier" "false" // ACTION: Convert to sealed class // ACTION: Create test +// ACTION: Do not show return expression hints // ERROR: Enum class is not allowed here class A() { inner class B() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedInterface.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedInterface.kt index 869025b69502..e0453c514efc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedInterface.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedInterface.kt @@ -1,4 +1,5 @@ // "Add 'inner' modifier" "false" +// ACTION: Do not show return expression hints // ACTION: Implement interface // ERROR: Interface is not allowed here class A() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedObject.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedObject.kt index 5472f4809baf..8f23f9eaca5a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedObject.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedObject.kt @@ -1,5 +1,6 @@ // "Add 'inner' modifier" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ERROR: Object is not allowed here class A() { inner class B() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedSealedClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedSealedClass.kt index e3fe905d0b87..06c4fe9dbee1 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedSealedClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/nestedSealedClass.kt @@ -1,6 +1,7 @@ // "Add 'inner' modifier" "false" // ACTION: Convert to enum class // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Implement sealed class // ERROR: Class is not allowed here class A() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/noAbstractForObject.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/noAbstractForObject.kt index 9887ea6cca14..97c4c3b28507 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/noAbstractForObject.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/noAbstractForObject.kt @@ -1,7 +1,8 @@ // "Make 'Some' abstract" "false" // ACTION: Create test -// ACTION: Implement members +// ACTION: Do not show return expression hints // ACTION: Extract 'Some' from current file +// ACTION: Implement members // ACTION: Rename file to Some.kt // ERROR: Object 'Some' is not abstract and does not implement abstract member public abstract fun foo(): Unit defined in T interface T { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/anonymousFunction.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/anonymousFunction.kt index 42b1551f9d3f..5c393c5f86ba 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/anonymousFunction.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/anonymousFunction.kt @@ -1,6 +1,7 @@ // "Make containing function suspend" "false" // ACTION: Convert to run // ACTION: Convert to with +// ACTION: Do not show return expression hints // DISABLE-ERRORS class A { suspend fun foo() {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/inLambda2.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/inLambda2.kt index 70a0298418f6..a5241d1d9be5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/inLambda2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/inLambda2.kt @@ -1,6 +1,7 @@ // "Make test suspend" "false" // DISABLE-ERRORS // ACTION: Convert to single-line lambda +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Introduce import alias // ACTION: Move lambda argument into parentheses diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/init.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/init.kt index f994d122591f..3ec5287ecb54 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/init.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/init.kt @@ -1,4 +1,5 @@ // "Make bar suspend" "false" +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ERROR: Suspend function 'foo' should be called only from a coroutine or another suspend function diff --git a/plugins/kotlin/idea/tests/testData/quickfix/moveReceiverAnnotation/notExtensionFun.kt b/plugins/kotlin/idea/tests/testData/quickfix/moveReceiverAnnotation/notExtensionFun.kt index 88639e82724a..9e11d699d482 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/moveReceiverAnnotation/notExtensionFun.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/moveReceiverAnnotation/notExtensionFun.kt @@ -1,9 +1,10 @@ // "Move annotation to receiver type" "false" // ERROR: This annotation is not applicable to target 'declaration' and use site target '@receiver' -// ACTION: Make internal -// ACTION: Introduce import alias -// ACTION: Make private // ACTION: Add annotation target +// ACTION: Do not show return expression hints +// ACTION: Introduce import alias +// ACTION: Make internal +// ACTION: Make private annotation class Ann diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/noComparison.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/noComparison.kt index 99b738741ddd..4e642603caf5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/noComparison.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/noComparison.kt @@ -1,9 +1,10 @@ // "Replace with safe (?.) call" "false" // ERROR: Operator call corresponds to a dot-qualified call 'p1.compareTo(p2)' which is not allowed on a nullable receiver 'p1'. // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints +// ACTION: Expand boolean expression to 'if else' // ACTION: Flip '>' // ACTION: Replace overloaded operator with function call -// ACTION: Expand boolean expression to 'if else' class SafeType { operator fun compareTo(other : SafeType) = 0 diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInCondition.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInCondition.kt index d5410a188e3f..d7d22258602b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInCondition.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInCondition.kt @@ -1,8 +1,9 @@ // "Replace with safe (?.) call" "false" // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints +// ACTION: Expand boolean expression to 'if else' // ACTION: Flip '<' // ACTION: Replace overloaded operator with function call -// ACTION: Expand boolean expression to 'if else' // ERROR: Operator call corresponds to a dot-qualified call 'w?.x.compareTo(42)' which is not allowed on a nullable receiver 'w?.x'. class Wrapper(val x: Int) diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInLogic.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInLogic.kt index d8a960860379..a507320a3fc0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInLogic.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInLogic.kt @@ -1,10 +1,11 @@ // "Replace with safe (?.) call" "false" // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints +// ACTION: Expand boolean expression to 'if else' // ACTION: Flip '>' // ACTION: Replace '&&' with '||' // ACTION: Replace overloaded operator with function call // ACTION: Simplify boolean expression -// ACTION: Expand boolean expression to 'if else' // ERROR: Operator call corresponds to a dot-qualified call 'w?.x.compareTo(42)' which is not allowed on a nullable receiver 'w?.x'. class Wrapper(val x: Int) diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhen.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhen.kt index 90ff87dded3c..dc81edac0056 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhen.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhen.kt @@ -1,9 +1,10 @@ // "Replace with safe (?.) call" "false" // ACTION: Add non-null asserted (!!) call -// ACTION: Flip '<=' +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter -// ACTION: Replace overloaded operator with function call // ACTION: Expand boolean expression to 'if else' +// ACTION: Flip '<=' +// ACTION: Replace overloaded operator with function call // ERROR: Operator call corresponds to a dot-qualified call 'w?.x.compareTo(42)' which is not allowed on a nullable receiver 'w?.x'. class Wrapper(val x: Int) diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhile.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhile.kt index 477c280bb53e..9bfeaef2d27b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhile.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhile.kt @@ -1,8 +1,9 @@ // "Replace with safe (?.) call" "false" // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints +// ACTION: Expand boolean expression to 'if else' // ACTION: Flip '>=' // ACTION: Replace overloaded operator with function call -// ACTION: Expand boolean expression to 'if else' // ERROR: Operator call corresponds to a dot-qualified call 'w?.x.compareTo(42)' which is not allowed on a nullable receiver 'w?.x'. class Wrapper(val x: Int) diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt index a85810f2bf47..1c31501c517b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt @@ -1,6 +1,7 @@ // "Replace with safe (?.) call" "false" // ACTION: Add non-null asserted (!!) call // ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with safe (this?.) call // ACTION: Wrap with '?.let { ... }' call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt index 0977c5b121e0..c3932e4be461 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt @@ -1,7 +1,8 @@ // "Replace with safe (?.) call" "false" // ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Wrap with '?.let { ... }' call // ERROR: Reference has a nullable type '(String.() -> Unit)?', use explicit '?.invoke()' to make a function-like call instead -fun foo(exec: (String.() -> Unit)?) = "".exec() \ No newline at end of file +fun foo(exec: (String.() -> Unit)?) = "".exec() diff --git a/plugins/kotlin/idea/tests/testData/quickfix/override/dontOfferToImplementMembersForExpectedClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/override/dontOfferToImplementMembersForExpectedClass.kt index 7ccb5d387444..2908583a58f9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/override/dontOfferToImplementMembersForExpectedClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/override/dontOfferToImplementMembersForExpectedClass.kt @@ -1,6 +1,7 @@ // "Implement members" "false" -// ACTION: Make internal +// ACTION: Do not show return expression hints // ACTION: Extract 'A' from current file +// ACTION: Make internal interface I { fun foo() diff --git a/plugins/kotlin/idea/tests/testData/quickfix/override/overridingOpenMethodInFinalClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/override/overridingOpenMethodInFinalClass.kt index 0053b08b8d1d..d0a4fc6cff16 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/override/overridingOpenMethodInFinalClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/override/overridingOpenMethodInFinalClass.kt @@ -1,4 +1,5 @@ // "Make A.foo open" "false" +// ACTION: Do not show return expression hints // ACTION: Go To Super Method // ERROR: This type is final, so it cannot be inherited from class A() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/primitiveCastToConversion/boolean.kt b/plugins/kotlin/idea/tests/testData/quickfix/primitiveCastToConversion/boolean.kt index 3a3c50806f72..820eab77b419 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/primitiveCastToConversion/boolean.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/primitiveCastToConversion/boolean.kt @@ -1,5 +1,6 @@ // "Replace cast with call to 'toInt()'" "false" // ACTION: Compiler warning 'CAST_NEVER_SUCCEEDS' options +// ACTION: Do not show return expression hints // WARNING: Cast can never succeed fun foo() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/properties/extensionPropertyInitializerToGetter/dontShowQuickfixOnExistingAccessors.kt b/plugins/kotlin/idea/tests/testData/quickfix/properties/extensionPropertyInitializerToGetter/dontShowQuickfixOnExistingAccessors.kt index 83af34155232..265b6ad4d3c0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/properties/extensionPropertyInitializerToGetter/dontShowQuickfixOnExistingAccessors.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/properties/extensionPropertyInitializerToGetter/dontShowQuickfixOnExistingAccessors.kt @@ -1,4 +1,5 @@ // "Convert extension property initializer to getter" "false" +// ACTION: Do not show return expression hints // ERROR: Extension property cannot be initialized because it has no backing field var String.foo: Int = 0 get() = 1 diff --git a/plugins/kotlin/idea/tests/testData/quickfix/redundantIf/assignmentFake.kt b/plugins/kotlin/idea/tests/testData/quickfix/redundantIf/assignmentFake.kt index da12313cd459..e8c9f863f9c6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/redundantIf/assignmentFake.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/redundantIf/assignmentFake.kt @@ -1,6 +1,7 @@ // "Remove redundant 'if' statement" "false" -// ACTION: Add braces to all 'if' statements // ACTION: Add braces to 'if' statement +// ACTION: Add braces to all 'if' statements +// ACTION: Do not show return expression hints // ACTION: Invert 'if' condition // ACTION: Replace 'if' with 'when' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeRedundantAssignment/notRedundant.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeRedundantAssignment/notRedundant.kt index 28bfc04aa87b..bf570173077d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeRedundantAssignment/notRedundant.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeRedundantAssignment/notRedundant.kt @@ -1,5 +1,6 @@ // "Remove redundant assignment" "false" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints fun foo(): Int { var i = 1 i = 2 diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/inIf.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/inIf.kt index dc4bf8f843bd..91d3be617bb0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/inIf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/inIf.kt @@ -1,11 +1,12 @@ // "Remove single lambda parameter declaration" "false" // ACTION: Add braces to 'if' statement // ACTION: Add braces to all 'if' statements +// ACTION: Convert to anonymous function // ACTION: Convert to multi-line lambda +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Remove explicit lambda parameter types (may break code) // ACTION: Rename to _ -// ACTION: Convert to anonymous function fun test(i: Int) { val p: (String) -> Boolean = if (i == 1) { s: String -> true } else { s: String -> false } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/inWhen.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/inWhen.kt index a914eb2db983..1f02028f0b9a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/inWhen.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/inWhen.kt @@ -1,11 +1,12 @@ // "Remove single lambda parameter declaration" "false" // ACTION: Add braces to 'when' entry // ACTION: Add braces to all 'when' entries +// ACTION: Convert to anonymous function // ACTION: Convert to multi-line lambda +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Remove explicit lambda parameter types (may break code) // ACTION: Rename to _ -// ACTION: Convert to anonymous function fun test(i: Int) { val p: (String) -> Boolean = when (i) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/propertyWithImplicitType.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/propertyWithImplicitType.kt index 5fae13e51645..70e8b01f8f15 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/propertyWithImplicitType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/propertyWithImplicitType.kt @@ -1,11 +1,12 @@ // "Remove single lambda parameter declaration" "false" -// ACTION: Remove explicit lambda parameter types (may break code) -// ACTION: Rename to _ // ACTION: Convert to also +// ACTION: Convert to anonymous function // ACTION: Convert to apply // ACTION: Convert to multi-line lambda +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter -// ACTION: Convert to anonymous function +// ACTION: Remove explicit lambda parameter types (may break code) +// ACTION: Rename to _ fun test() { val f = { i: Int -> foo() } bar(f) diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/importEnumValues.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/importEnumValues.kt index 3348c4f6daee..f8b15952bf84 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/importEnumValues.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/importEnumValues.kt @@ -1,6 +1,7 @@ // "Safe delete 'MyEnum'" "false" -// ACTION: Create test // ACTION: Convert to sealed class +// ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Rename file to MyEnum.kt import MyEnum.values diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/importObjectFun.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/importObjectFun.kt index 72e41b9a11f8..61374a246502 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/importObjectFun.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/importObjectFun.kt @@ -1,5 +1,6 @@ // "Safe delete 'MyObj'" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Rename file to MyObj.kt import MyObj.foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedClassAsAlias.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedClassAsAlias.kt index 05a65346f071..d3a77d475852 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedClassAsAlias.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedClassAsAlias.kt @@ -1,5 +1,6 @@ // "Safe delete 'Imported'" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Extract 'ImportedClass' from current file // ACTION: Rename file to ImportedClass.kt import ImportedClass as ClassAlias diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedObjectAsAlias.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedObjectAsAlias.kt index 8f50f5a116ff..7b9bf41df2f0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedObjectAsAlias.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedObjectAsAlias.kt @@ -1,5 +1,6 @@ // "Safe delete 'Imported'" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Extract 'Imported' from current file // ACTION: Rename file to Imported.kt import Imported as Alias diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedObjectAsAliasMulti.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedObjectAsAliasMulti.before.Main.kt index 652b97f3944f..9535a82b2e79 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedObjectAsAliasMulti.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedObjectAsAliasMulti.before.Main.kt @@ -1,4 +1,5 @@ // "Safe delete 'Imported'" "false" // ACTION: Create test // ACTION: Rename file to Imported.kt +// ACTION: Do not show return expression hints object Imported \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/functionExpressionParameterNoRemoveParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/functionExpressionParameterNoRemoveParameter.kt index 4049eba5defe..bb87829ab18e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/functionExpressionParameterNoRemoveParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/functionExpressionParameterNoRemoveParameter.kt @@ -1,10 +1,11 @@ // "Remove parameter 'x'" "false" // ACTION: Add 'block =' to argument // ACTION: Convert parameter to receiver -// ACTION: Rename to _ -// ACTION: Specify return type explicitly +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Put parameters on separate lines +// ACTION: Rename to _ +// ACTION: Specify return type explicitly fun foo(block: (String, Int) -> Unit) { block("", 1) diff --git a/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/lambdaParameterNoRemoveParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/lambdaParameterNoRemoveParameter.kt index db0a94f58a78..52a317bd5175 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/lambdaParameterNoRemoveParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/lambdaParameterNoRemoveParameter.kt @@ -1,10 +1,11 @@ // "Remove parameter 'x'" "false" +// ACTION: Convert to anonymous function +// ACTION: Convert to single-line lambda +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Move lambda argument into parentheses // ACTION: Remove explicit lambda parameter types (may break code) // ACTION: Rename to _ -// ACTION: Convert to anonymous function -// ACTION: Convert to single-line lambda fun foo(block: (String, Int) -> Unit) { block("", 1) diff --git a/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/noActionForCommonFunction.kt b/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/noActionForCommonFunction.kt index a31b061bf990..ece706448035 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/noActionForCommonFunction.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/noActionForCommonFunction.kt @@ -1,5 +1,6 @@ // "Rename to _" "false" // ACTION: Convert parameter to receiver +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Remove parameter 'x' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/divAssignOnMutableMap.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/divAssignOnMutableMap.kt index b8520bd0534c..b44bc03224e0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/divAssignOnMutableMap.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/divAssignOnMutableMap.kt @@ -1,6 +1,7 @@ // "Replace with safe (?.) call" "false" // WITH_STDLIB // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // ERROR: Operator call corresponds to a dot-qualified call 'map[3].divAssign(5)' which is not allowed on a nullable receiver 'map[3]'. diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/minusAssignOnMutableMap.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/minusAssignOnMutableMap.kt index 90c630ac5aa0..1288833a2bf8 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/minusAssignOnMutableMap.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/minusAssignOnMutableMap.kt @@ -1,6 +1,7 @@ // "Replace with safe (?.) call" "false" // WITH_STDLIB // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // ERROR: Operator call corresponds to a dot-qualified call 'map[3].minusAssign(5)' which is not allowed on a nullable receiver 'map[3]'. diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/plusAssignOnMutableMap.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/plusAssignOnMutableMap.kt index f2077f770b9a..20cdfa897850 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/plusAssignOnMutableMap.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/plusAssignOnMutableMap.kt @@ -1,6 +1,7 @@ // "Replace with safe (?.) call" "false" // WITH_STDLIB // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // ERROR: Operator call corresponds to a dot-qualified call 'map[3].plusAssign(5)' which is not allowed on a nullable receiver 'map[3]'. diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/remAssignOnMutableMap.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/remAssignOnMutableMap.kt index e5b0496593d3..07bea02e272b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/remAssignOnMutableMap.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/remAssignOnMutableMap.kt @@ -1,6 +1,7 @@ // "Replace with safe (?.) call" "false" // WITH_STDLIB // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // ERROR: Operator call corresponds to a dot-qualified call 'map[3].remAssign(5)' which is not allowed on a nullable receiver 'map[3]'. diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/timesAssignOnMutableMap.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/timesAssignOnMutableMap.kt index 4a1325a09679..b1e0421b5c83 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/timesAssignOnMutableMap.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceInfixOrOperatorCall/timesAssignOnMutableMap.kt @@ -1,6 +1,7 @@ // "Replace with safe (?.) call" "false" // WITH_STDLIB // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // ERROR: Operator call corresponds to a dot-qualified call 'map[3].timesAssign(5)' which is not allowed on a nullable receiver 'map[3]'. diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceJvmFieldWithConst/getter.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceJvmFieldWithConst/getter.kt index 7d3709e9a860..abad2353e57d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceJvmFieldWithConst/getter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceJvmFieldWithConst/getter.kt @@ -1,6 +1,7 @@ // "Replace '@JvmField' with 'const'" "false" // WITH_STDLIB // ERROR: This annotation is not applicable to target 'top level property without backing field or delegate' +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Remove explicit type specification @JvmField val number: Int diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceJvmFieldWithConst/nullable.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceJvmFieldWithConst/nullable.kt index d6276dcde60f..d8f448418123 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceJvmFieldWithConst/nullable.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceJvmFieldWithConst/nullable.kt @@ -1,10 +1,11 @@ // "Replace '@JvmField' with 'const'" "false" // WITH_STDLIB // ERROR: JvmField has no effect on a private property +// ACTION: Add use-site target 'field' // ACTION: Convert to lazy property +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make public -// ACTION: Remove explicit type specification -// ACTION: Add use-site target 'field' // ACTION: Remove @JvmField annotation +// ACTION: Remove explicit type specification @JvmField private val number: Int? = 42 \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCall/noReplaceWithSafeCallForImplicitReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCall/noReplaceWithSafeCallForImplicitReceiver.kt index 1710a8512438..8f41408b03cb 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCall/noReplaceWithSafeCallForImplicitReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCall/noReplaceWithSafeCallForImplicitReceiver.kt @@ -1,5 +1,6 @@ // "Replace with safe (?.) call" "false" // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Replace with safe (this?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type A? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithFake.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithFake.kt index 513ac3e12bfb..2803a7fb3bc7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithFake.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithFake.kt @@ -1,6 +1,7 @@ // "Replace scope function with safe (?.) call" "false" // WITH_STDLIB // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ACTION: Surround with null check diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThisLabeledFake.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThisLabeledFake.kt index c5048bf68ece..8f618f510143 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThisLabeledFake.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThisLabeledFake.kt @@ -1,7 +1,8 @@ // "Replace scope function with safe (?.) call" "false" // WITH_STDLIB -// ACTION: Introduce local variable // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints +// ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type My? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongImplicitThis.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongImplicitThis.kt index 0722831af105..6413ed17c813 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongImplicitThis.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongImplicitThis.kt @@ -1,13 +1,14 @@ // "Replace scope function with safe (?.) call" "false" // WITH_STDLIB +// ACTION: Add 'return@let' // ACTION: Add non-null asserted (!!) call +// ACTION: Convert to single-line lambda +// ACTION: Do not show implicit receiver and parameter hints +// ACTION: Enable a trailing comma by default in the formatter // ACTION: Introduce local variable // ACTION: Move lambda argument into parentheses // ACTION: Replace with safe (this?.) call // ACTION: Specify explicit lambda signature -// ACTION: Add 'return@let' -// ACTION: Convert to single-line lambda -// ACTION: Enable a trailing comma by default in the formatter // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String? fun String?.foo(a: String?) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongParam.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongParam.kt index 605a62d18d21..7e5b4ec77f92 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongParam.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongParam.kt @@ -1,10 +1,11 @@ // "Replace scope function with safe (?.) call" "false" // WITH_STDLIB +// ACTION: Add 'return@let' // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ACTION: Surround with null check -// ACTION: Add 'return@let' // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String? fun foo(a: String?, b: String?) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/notInsideScope.kt b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/notInsideScope.kt index 0d8f30c87fa7..662b4c60034e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/notInsideScope.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/replaceWithSafeCallForScopeFunction/notInsideScope.kt @@ -1,5 +1,6 @@ // "Replace scope function with safe (?.) call" "false" // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ACTION: Surround with null check diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/binaryRetention.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/binaryRetention.kt index d41076109c2d..4b62bbc8f115 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/binaryRetention.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/binaryRetention.kt @@ -1,6 +1,7 @@ // "Add SOURCE retention" "false" // DISABLE-ERRORS // ACTION: Change existent retention to SOURCE +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ACTION: Remove EXPRESSION target diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/emptyRetention.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/emptyRetention.kt index 6ed75a3790ff..c61c77da6b4f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/emptyRetention.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/emptyRetention.kt @@ -1,6 +1,7 @@ // "Add SOURCE retention" "false" // DISABLE-ERRORS // ACTION: Change existent retention to SOURCE +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ACTION: Remove EXPRESSION target diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/emptyRetention2.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/emptyRetention2.kt index 2d90607950a5..14680a6af9f4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/emptyRetention2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/emptyRetention2.kt @@ -1,6 +1,7 @@ // "Add SOURCE retention" "false" // DISABLE-ERRORS // ACTION: Change existent retention to SOURCE +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ACTION: Remove EXPRESSION target diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/noRetention.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/noRetention.kt index 5668b209df14..c70fc4020291 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/noRetention.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/noRetention.kt @@ -1,6 +1,7 @@ // "Change existent retention to SOURCE" "false" // DISABLE-ERRORS // ACTION: Add SOURCE retention +// ACTION: Do not show return expression hints // ACTION: Make internal // ACTION: Make private // ACTION: Remove EXPRESSION target diff --git a/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenElseMultiStatement.kt b/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenElseMultiStatement.kt index 09960db5098e..f930bfb4274f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenElseMultiStatement.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenElseMultiStatement.kt @@ -1,5 +1,6 @@ // "Replace 'if' expression with elvis expression" "false" // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // DISABLE-ERRORS class Test { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenMultiStatement.kt b/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenMultiStatement.kt index 5d1ab56d3cec..ac32f4ac353a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenMultiStatement.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenMultiStatement.kt @@ -1,5 +1,6 @@ // "Replace 'if' expression with safe access expression" "false" // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // DISABLE-ERRORS class Test { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/specifyOverrideExplicitly/notPossible.kt b/plugins/kotlin/idea/tests/testData/quickfix/specifyOverrideExplicitly/notPossible.kt index 8ced5e6cac4d..479b93d7d862 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/specifyOverrideExplicitly/notPossible.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/specifyOverrideExplicitly/notPossible.kt @@ -1,10 +1,11 @@ // "Specify override for 'foo(): Unit' explicitly" "false" // ACTION: Compiler warning 'DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE' options // ACTION: Create test -// ACTION: Make primary constructor internal -// ACTION: Make primary constructor private +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Extract 'C' from current file +// ACTION: Make primary constructor internal +// ACTION: Make primary constructor private // ACTION: Rename file to C.kt interface A { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/supertypeInitialization/addParenthesisForInvalidSealedClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/supertypeInitialization/addParenthesisForInvalidSealedClass.kt index 60c2bf1c61a7..e47ace5aac01 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/supertypeInitialization/addParenthesisForInvalidSealedClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/supertypeInitialization/addParenthesisForInvalidSealedClass.kt @@ -1,4 +1,5 @@ // "Change to constructor invocation" "false" +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ERROR: This type has a constructor, and thus must be initialized here // ERROR: This type is sealed, so it can be inherited by only its own nested classes or objects diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suppress/external/suppressActive.kt b/plugins/kotlin/idea/tests/testData/quickfix/suppress/external/suppressActive.kt index 116c789168fd..07a0615c15c9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suppress/external/suppressActive.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suppress/external/suppressActive.kt @@ -1,10 +1,11 @@ // "Typo: Change to..." "false" // TOOL: com.intellij.spellchecker.inspections.SpellCheckingInspection -// ACTION: Convert to lazy property // ACTION: Add 'const' modifier // ACTION: Convert property initializer to getter -// ACTION: To raw string literal // ACTION: Convert to 'buildString' call +// ACTION: Convert to lazy property +// ACTION: Do not show return expression hints +// ACTION: To raw string literal @Suppress("SpellCheckingInspection") val str = "kjsghkjshtiurhuig" \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/chainedUnsafeCall.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/chainedUnsafeCall.kt index 1d46e1cd8cc8..76afa09ca011 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/chainedUnsafeCall.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/chainedUnsafeCall.kt @@ -1,6 +1,7 @@ // "Surround with null check" "false" -// ACTION: Introduce local variable // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints +// ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt index ce71690956ad..e60b483d786c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt @@ -1,6 +1,7 @@ // "Surround with null check" "false" // ACTION: Add non-null asserted (!!) call // ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda2.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda2.kt index 5e6bccee3a31..a1fb0bc30981 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/inLambda2.kt @@ -1,6 +1,7 @@ // "Surround with null check" "false" -// ACTION: Add non-null asserted (!!) call // ACTION: Add 'return@bar' +// ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: Replace 'it' with explicit parameter // ACTION: Replace with safe (?.) call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt index d65aaa6ca48e..7fea9fa90214 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt @@ -1,5 +1,6 @@ // "Surround with null check" "false" // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInGetter.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInGetter.kt index f3704618a4d0..1a9e0d6d4384 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInGetter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInGetter.kt @@ -2,6 +2,7 @@ // ACTION: Add non-null asserted (!!) call // ACTION: Convert property getter to initializer // ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unstableValue.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unstableValue.kt index a7e6da1c0800..77145843fc15 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unstableValue.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unstableValue.kt @@ -1,9 +1,10 @@ // "Surround with null check" "false" -// ACTION: Introduce local variable // ACTION: Add non-null asserted (!!) call -// ACTION: Replace with safe (?.) call // ACTION: Convert to run // ACTION: Convert to with +// ACTION: Do not show return expression hints +// ACTION: Introduce local variable +// ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int? class My(var x: Int?) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/noInitializer.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/noInitializer.kt index 53063f3fa6aa..b904f6be6a6c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/noInitializer.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/noInitializer.kt @@ -1,5 +1,6 @@ // "Change type to mutable" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/notLocal.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/notLocal.kt index 8a2e562a1e1b..83ae85af4bb5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/notLocal.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/notLocal.kt @@ -1,5 +1,6 @@ // "Change type to mutable" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/noInitializer.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/noInitializer.kt index 1d1ed03311b7..caa9bc6fc87b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/noInitializer.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/noInitializer.kt @@ -1,5 +1,6 @@ // "Join with initializer" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/notLocal.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/notLocal.kt index 060a2cc107c2..d85781ce09bf 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/notLocal.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/notLocal.kt @@ -1,5 +1,6 @@ // "Join with initializer" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/used.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/used.kt index 258a552cbe5d..29f07c6061ac 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/used.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/used.kt @@ -1,6 +1,7 @@ // "Join with initializer" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/differentType.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/differentType.kt index 0f0ef843cf2c..326fec2d943e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/differentType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/differentType.kt @@ -1,6 +1,7 @@ // "Replace with assignment (original is empty)" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/listOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/listOf.kt index ffc1a58e28e9..69e27db4d792 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/listOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/listOf.kt @@ -1,6 +1,7 @@ // "Replace with assignment (original is empty)" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/mapOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/mapOf.kt index 0eee25501085..5a339ca960ed 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/mapOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/mapOf.kt @@ -1,6 +1,7 @@ // "Replace with assignment (original is empty)" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/minusEq.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/minusEq.kt index 57c12fe2ad18..444ec8e945f5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/minusEq.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/minusEq.kt @@ -1,6 +1,7 @@ // "Replace with assignment (original is empty)" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with filter // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/noInitializer.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/noInitializer.kt index 9c8d580acfe0..516321c5d706 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/noInitializer.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/noInitializer.kt @@ -1,4 +1,5 @@ // "Replace with assignment (original is empty)" "false" +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notEmpty.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notEmpty.kt index 4a2682a1168f..827883de73ab 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notEmpty.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notEmpty.kt @@ -1,6 +1,7 @@ // "Replace with assignment (original is empty)" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notLocal.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notLocal.kt index 725a101256ca..168dcdcb1acc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notLocal.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notLocal.kt @@ -1,4 +1,5 @@ // "Replace with assignment (original is empty)" "false" +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/setOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/setOf.kt index 9c69711459e9..4f83abca085c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/setOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/setOf.kt @@ -1,6 +1,7 @@ // "Replace with assignment (original is empty)" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/used.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/used.kt index 538571bc7adf..22a434097702 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/used.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/used.kt @@ -1,6 +1,7 @@ // "Replace with assignment (original is empty)" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/map.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/map.kt index bc581929ed8d..71993235cb6e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/map.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/map.kt @@ -1,6 +1,7 @@ // "Replace with filter" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Join with initializer // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/notIterable.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/notIterable.kt index 45347de6f551..0e8ce5a903f0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/notIterable.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/notIterable.kt @@ -1,6 +1,7 @@ // "Replace with filter" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Join with initializer // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/plusEq.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/plusEq.kt index 29f3576abe4e..ba9bc4d5ed70 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/plusEq.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/plusEq.kt @@ -1,6 +1,7 @@ // "Replace with filter" "false" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Join with initializer // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt index fb8e447e9913..68c40f65be32 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt @@ -1,6 +1,7 @@ // "Replace with ordinary assignment" "true" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Remove braces from 'if' statement // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt.after index fc869691e01c..ddd2b8f19a5f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt.after @@ -1,6 +1,7 @@ // "Replace with ordinary assignment" "true" // TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable +// ACTION: Do not show return expression hints // ACTION: Remove braces from 'if' statement // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/tooLongCharLiteralToString/backslash.kt b/plugins/kotlin/idea/tests/testData/quickfix/tooLongCharLiteralToString/backslash.kt index 8c487ace9d96..6cf0787962fd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/tooLongCharLiteralToString/backslash.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/tooLongCharLiteralToString/backslash.kt @@ -1,5 +1,6 @@ // "Convert too long character literal to string" "false" // ACTION: Compiler warning 'UNUSED_EXPRESSION' options +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ERROR: Illegal escape: ''\'' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/tooLongCharLiteralToString/startWithBackslashInString.kt b/plugins/kotlin/idea/tests/testData/quickfix/tooLongCharLiteralToString/startWithBackslashInString.kt index 5fe4ed571cb3..a42624ef7ca7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/tooLongCharLiteralToString/startWithBackslashInString.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/tooLongCharLiteralToString/startWithBackslashInString.kt @@ -1,8 +1,9 @@ // "Convert too long character literal to string" "false" // ACTION: Compiler warning 'UNUSED_EXPRESSION' options +// ACTION: Convert to 'buildString' call +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: To raw string literal -// ACTION: Convert to 'buildString' call // ERROR: Illegal escape: '\ ' fun foo() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/propertyHasType.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/propertyHasType.kt index 1aacb4fb2db9..c4c57a1ef998 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/propertyHasType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/propertyHasType.kt @@ -2,5 +2,6 @@ // ACTION: Add getter // ACTION: Add initializer // ACTION: Convert property to function +// ACTION: Do not show return expression hints // ERROR: Property must be initialized val test: Int diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/publicFunWithoutBody.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/publicFunWithoutBody.kt index 0a4023d45cb2..31267b9f489f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/publicFunWithoutBody.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/publicFunWithoutBody.kt @@ -1,8 +1,9 @@ // "Specify return type explicitly" "false" // ERROR: Function 'foo' without a body must be abstract // ACTION: Add function body -// ACTION: Make 'foo' 'abstract' // ACTION: Convert member to extension +// ACTION: Do not show return expression hints +// ACTION: Make 'foo' 'abstract' package a diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/casts/typeMismatch2.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/casts/typeMismatch2.kt index de698651c450..b6300b697edf 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/casts/typeMismatch2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/casts/typeMismatch2.kt @@ -1,5 +1,6 @@ // "Cast expression 'Foo()' to 'Foo'" "false" // ACTION: Change return type of enclosing function 'foo' to 'Foo' +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ERROR: Type mismatch: inferred type is Foo but Foo was expected // COMPILER_ARGUMENTS: -XXLanguage:-NewInference diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/kt25928.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/kt25928.kt index 044711b11f65..a0de270f6bef 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/kt25928.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/kt25928.kt @@ -1,6 +1,7 @@ // "Let 'Foo?' extend interface 'Foo'" "false" // ACTION: Add non-null asserted (!!) call // ACTION: Change type of 'x' to 'Foo?' +// ACTION: Do not show return expression hints // ERROR: Type mismatch: inferred type is Foo? but Foo was expected interface Foo diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType4.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType4.kt index e79e552c1753..9d38be6d1422 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType4.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType4.kt @@ -1,7 +1,8 @@ // "Change parameter 'z' type of function 'foo' to '(Int) -> String'" "false" // ACTION: Convert to 'buildString' call -// ACTION: To raw string literal +// ACTION: Do not show return expression hints // ACTION: Introduce local variable +// ACTION: To raw string literal fun foo(y: Int = 0, z: (Int) -> String = {""}) { foo { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/dontChangeFunctionReturnTypeToErrorType.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/dontChangeFunctionReturnTypeToErrorType.kt index 0f0a2ff97687..c38ac4906df2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/dontChangeFunctionReturnTypeToErrorType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/dontChangeFunctionReturnTypeToErrorType.kt @@ -4,9 +4,10 @@ // ACTION: Create class 'NoSuchType' // ACTION: Create enum 'NoSuchType' // ACTION: Create interface 'NoSuchType' +// ACTION: Create type parameter 'NoSuchType' in function 'foo' +// ACTION: Do not show implicit receiver and parameter hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Remove explicit lambda parameter types (may break code) -// ACTION: Create type parameter 'NoSuchType' in function 'foo' // ERROR: Type mismatch: inferred type is ([Error type: Unresolved type for NoSuchType]) -> Int but Int was expected // ERROR: Unresolved reference: NoSuchType diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverride.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverride.kt index e982cc5fc634..3176a926f151 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverride.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverride.kt @@ -1,5 +1,6 @@ // "Change return type of called function 'AA.f' to 'Boolean'" "false" // ACTION: Change return type of enclosing function 'AAA.g' to 'Int' +// ACTION: Do not show return expression hints // ERROR: Type mismatch: inferred type is Int but Boolean was expected interface A { fun f(): Int diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull2.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull2.kt index 203a462936d2..dec6d438e60a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull2.kt @@ -1,6 +1,7 @@ // "Change type of 'x' to 'String?'" "false" -// ACTION: Converts the assignment statement to an expression // ACTION: Convert to 'buildString' call +// ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ACTION: Remove braces from 'if' statement // ACTION: To raw string literal // ERROR: Type mismatch: inferred type is String but Nothing? was expected diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull3.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull3.kt index d4cba43dcfb1..7b4eafa01f58 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull3.kt @@ -1,6 +1,7 @@ // "Change type of 'x' to 'String?'" "false" -// ACTION: Converts the assignment statement to an expression // ACTION: Convert to 'buildString' call +// ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ACTION: Remove braces from 'if' statement // ACTION: To raw string literal // ERROR: Type mismatch: inferred type is String but Int? was expected diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull4.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull4.kt index c13142a8073e..ec386c2e07dc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull4.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/variableInitializedWithNull4.kt @@ -1,6 +1,7 @@ // "Change type of 'x' to 'String?'" "false" -// ACTION: Converts the assignment statement to an expression // ACTION: Convert to 'buildString' call +// ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ACTION: Remove braces from 'if' statement // ACTION: To raw string literal // ERROR: Type mismatch: inferred type is String but Int was expected diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeOfAnnotationMember/star.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeOfAnnotationMember/star.kt index 1e86bad12dbb..3c1a1916efec 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeOfAnnotationMember/star.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeOfAnnotationMember/star.kt @@ -2,8 +2,9 @@ // WITH_STDLIB // ERROR: Invalid type of annotation member // ACTION: Add full qualifier -// ACTION: Introduce import alias +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Introduce import alias // ACTION: Put parameters on one line annotation class SuperAnnotation( val foo: Array<*>, diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeOfAnnotationMember/string.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeOfAnnotationMember/string.kt index bbcee3044cb7..ae0bc26167de 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeOfAnnotationMember/string.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeOfAnnotationMember/string.kt @@ -1,10 +1,11 @@ // "Replace array of boxed with array of primitive" "false" // WITH_STDLIB // ACTION: Add full qualifier -// ACTION: Put parameters on one line -// ACTION: Introduce import alias -// ACTION: Enable a trailing comma by default in the formatter // ACTION: Convert to vararg parameter (may break code) +// ACTION: Do not show return expression hints +// ACTION: Enable a trailing comma by default in the formatter +// ACTION: Introduce import alias +// ACTION: Put parameters on one line annotation class SuperAnnotation( val str: Array ) \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForDeprecated.kt b/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForDeprecated.kt index 9416ecbb39dd..466eca4dd224 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForDeprecated.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForDeprecated.kt @@ -1,5 +1,6 @@ // "Suppress unused warning if annotated by 'kotlin.Deprecated'" "false" // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter @Deprecated("") fun foo(){} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForJava.kt b/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForJava.kt index 2a148cd22aa9..f3d47150e6f2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForJava.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForJava.kt @@ -1,6 +1,7 @@ // "Suppress unused warning if annotated by 'java.lang.SuppressWarnings'" "false" -// ACTION: Safe delete 'Unused' // ACTION: Create test +// ACTION: Do not show return expression hints // ACTION: Rename file to Unused.kt +// ACTION: Safe delete 'Unused' @java.lang.SuppressWarnings("") class Unused diff --git a/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForJetBrains.kt b/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForJetBrains.kt index 71d731b42314..280494d544ba 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForJetBrains.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/unusedSuppressAnnotation/notForJetBrains.kt @@ -1,6 +1,7 @@ // "Suppress unused warning if annotated by 'org.jetbrains.annotations.NonNls'" "false" -// ACTION: Safe delete 'foo' // ACTION: Create test +// ACTION: Do not show return expression hints +// ACTION: Safe delete 'foo' import org.jetbrains.annotations.NonNls @NonNls diff --git a/plugins/kotlin/idea/tests/testData/quickfix/variables/changeMutability/funParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/variables/changeMutability/funParameter.kt index e93797c0dced..c34d4d04d5a6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/variables/changeMutability/funParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/variables/changeMutability/funParameter.kt @@ -1,5 +1,6 @@ // "Change to 'var'" "false" // ACTION: Converts the assignment statement to an expression +// ACTION: Do not show return expression hints // ACTION: Remove redundant assignment // ERROR: Val cannot be reassigned fun fun1(i: Int) { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableInDestructuringDeclaration.kt b/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableInDestructuringDeclaration.kt index e28c84dd9853..292fe89b3fcc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableInDestructuringDeclaration.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableInDestructuringDeclaration.kt @@ -1,4 +1,5 @@ // "Remove variable 'one'" "false" +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Rename to _ // ACTION: Specify all types explicitly in destructuring declaration diff --git a/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableWithAnonymousFunctionInitialize1.kt b/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableWithAnonymousFunctionInitialize1.kt index 1e49a4865e67..81767a444218 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableWithAnonymousFunctionInitialize1.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableWithAnonymousFunctionInitialize1.kt @@ -1,5 +1,6 @@ // "Remove variable 'a'" "false" // ACTION: Compiler warning 'UNUSED_VARIABLE' options +// ACTION: Do not show return expression hints // ACTION: Split property declaration fun test() { val a: (String) -> Unit = fun(s) { s + s } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableWithLambdaInitializer1.kt b/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableWithLambdaInitializer1.kt index ec2bfba233a0..5a95e4e75e86 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableWithLambdaInitializer1.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableWithLambdaInitializer1.kt @@ -1,5 +1,6 @@ // "Remove variable 'a'" "false" // ACTION: Compiler warning 'UNUSED_VARIABLE' options +// ACTION: Do not show return expression hints // ACTION: Split property declaration fun test() { val a: (String) -> Unit = { s -> s + s } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingRightParenthesis.kt b/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingRightParenthesis.kt index 43265c06df08..76730ba21fb0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingRightParenthesis.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingRightParenthesis.kt @@ -1,4 +1,5 @@ // "Add remaining branches" "false" +// ACTION: Do not show return expression hints // WITH_STDLIB sealed class A diff --git a/plugins/kotlin/idea/tests/testData/quickfix/when/notRedundantBranch.kt b/plugins/kotlin/idea/tests/testData/quickfix/when/notRedundantBranch.kt index 7ebd7dc29090..69451e2bc9a6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/when/notRedundantBranch.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/when/notRedundantBranch.kt @@ -1,6 +1,7 @@ // "Remove branch" "false" // ACTION: Add braces to 'when' entry // ACTION: Add braces to all 'when' entries +// ACTION: Do not show return expression hints // ACTION: Enable a trailing comma by default in the formatter // ACTION: Remove condition fun test(x: Int): String { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/chainedUnsafeCall.kt b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/chainedUnsafeCall.kt index c6f27e5cef01..a536d30bbd73 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/chainedUnsafeCall.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/chainedUnsafeCall.kt @@ -1,6 +1,7 @@ // "Wrap with '?.let { ... }' call" "false" // WITH_STDLIB // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/expressionUnsafeCall.kt b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/expressionUnsafeCall.kt index 9b3fc6ad9e25..db5dfbeb8716 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/expressionUnsafeCall.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/expressionUnsafeCall.kt @@ -2,6 +2,7 @@ // WITH_STDLIB // ACTION: Add non-null asserted (!!) call // ACTION: Convert to block body +// ACTION: Do not show return expression hints // ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/extensionMethod.kt b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/extensionMethod.kt index f69e548225d4..3661ad407788 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/extensionMethod.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/extensionMethod.kt @@ -1,6 +1,7 @@ // "Wrap with '?.let { ... }' call" "false" // WITH_STDLIB // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Introduce import alias // ACTION: Introduce local variable // ACTION: Replace with safe (this?.) call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/inOperator.kt b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/inOperator.kt index ed5b823ae212..550a742a2085 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/inOperator.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/inOperator.kt @@ -1,5 +1,6 @@ // "Wrap with '?.let { ... }' call" "false" // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Replace overloaded operator with function call // ACTION: Replace with safe (?.) call // ACTION: Surround with null check diff --git a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/nullableReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/nullableReceiver.kt index 222423ff6773..fc537b96f426 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/nullableReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/nullableReceiver.kt @@ -2,6 +2,7 @@ // ACTION: Add non-null asserted (!!) call // ACTION: Convert to run // ACTION: Convert to with +// ACTION: Do not show return expression hints // ACTION: Replace with safe (?.) call // ACTION: Surround with null check // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type B? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/unsafeForNullableParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/unsafeForNullableParameter.kt index af1e92538ba7..9e30965088e8 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/unsafeForNullableParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/unsafeForNullableParameter.kt @@ -1,9 +1,10 @@ // "Wrap with '?.let { ... }' call" "false" // ACTION: Add 's =' to argument // ACTION: Add non-null asserted (!!) call -// ACTION: Replace with safe (?.) call // ACTION: Convert to run // ACTION: Convert to with +// ACTION: Do not show return expression hints +// ACTION: Replace with safe (?.) call // ACTION: Surround with null check // DISABLE-ERRORS // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/unstableValue.kt b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/unstableValue.kt index 25c264209078..907fb71dc1d3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/unstableValue.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/unstableValue.kt @@ -1,9 +1,10 @@ // "Wrap with '?.let { ... }' call" "false" // WITH_STDLIB // ACTION: Add non-null asserted (!!) call -// ACTION: Replace with safe (?.) call // ACTION: Convert to run // ACTION: Convert to with +// ACTION: Do not show return expression hints +// ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int? fun Int.bar() {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/wrapAllNonNullablePositions6.kt b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/wrapAllNonNullablePositions6.kt index b173c8cd0f46..87835ff78d09 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/wrapAllNonNullablePositions6.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/wrapAllNonNullablePositions6.kt @@ -2,6 +2,7 @@ // SHOULD_BE_AVAILABLE_AFTER_EXECUTION // ACTION: Add 'a =' to argument // ACTION: Add non-null asserted (!!) call +// ACTION: Do not show return expression hints // ACTION: Flip '+' // ACTION: Introduce local variable // ACTION: Replace overloaded operator with function call diff --git a/plugins/kotlin/plugin/resources/META-INF/inspections.xml b/plugins/kotlin/plugin/resources/META-INF/inspections.xml index 13fe50c2c67d..7fe128e3dc08 100644 --- a/plugins/kotlin/plugin/resources/META-INF/inspections.xml +++ b/plugins/kotlin/plugin/resources/META-INF/inspections.xml @@ -1098,6 +1098,10 @@ group.names.kotlin
+ + org.jetbrains.kotlin.idea.codeInsight.hints.EnableKotlinTypeHintsOption + + UsefulTestCase.assertOrderedEquals( - "Some unexpected actions available at current position. Use '$ACTION_DIRECTIVE' directive", + "Some unexpected actions available at current position. Use '$ACTION_DIRECTIVE' directive\n", actualActionsDirectives, expectedDirectives )