From 59f192ef900c2239649c3628d09c343264367a37 Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Fri, 6 Mar 2015 12:51:59 +0300 Subject: [PATCH] Replace 'class object' with 'default object' in renderers and test data Includes changes to decompiled text Old syntax is used in builtins and project code for now --- .../org/jetbrains/kotlin/psi/DebugTextUtil.kt | 6 --- .../kotlin/resolve/OverloadResolver.java | 2 +- .../asJava/lightClassStructure/ClassObject.kt | 2 +- .../PlatformStaticMethodsGenerics.kt | 2 +- .../ClassObjectField.kt | 2 +- .../TraitClassObjectField.kt | 2 +- compiler/testData/builtin-classes.txt | 30 +++++++-------- .../local/LocalDeclarations.instructions | 2 +- .../declarations/local/LocalDeclarations.kt | 2 +- .../local/LocalDeclarations.values | 2 +- .../boxPrimitiveTypeInClinitOfClassObject.kt | 2 +- .../codegen/box/classes/classObject.kt | 2 +- .../classes/classObjectAsExtensionReceiver.kt | 2 +- .../classes/classObjectAsStaticInitializer.kt | 2 +- .../codegen/box/classes/classObjectField.kt | 2 +- .../codegen/box/classes/classObjectInTrait.kt | 2 +- .../box/classes/classObjectNotOfEnum.kt | 2 +- .../box/classes/classObjectToString.kt | 2 +- .../classObjectWithPrivateGenericMember.kt | 2 +- .../classes/classObjectsWithParentClasses.kt | 2 +- .../classes/extensionOnNamedClassObject.kt | 2 +- .../testData/codegen/box/classes/kt1018.kt | 2 +- .../testData/codegen/box/classes/kt2384.kt | 2 +- .../testData/codegen/box/classes/kt249.kt | 2 +- .../testData/codegen/box/classes/kt2784.kt | 2 +- .../testData/codegen/box/classes/kt508.kt | 2 +- .../codegen/box/classes/namedClassObject.kt | 2 +- .../defaultArguments/constructor/kt3060.kt | 2 +- .../extentionFunctionInClassObject.kt | 2 +- .../codegen/box/delegatedProperty/kt4138.kt | 4 +- .../propertyMetadataShouldBeCached.kt | 2 +- .../invoke/onObjects/invokeOnClassObject1.kt | 2 +- .../invoke/onObjects/invokeOnClassObject1.txt | 2 +- .../invoke/onObjects/invokeOnClassObject2.kt | 2 +- .../invoke/onObjects/invokeOnClassObject2.txt | 2 +- .../invokeOnClassObjectOfNestedClass1.kt | 2 +- .../invokeOnClassObjectOfNestedClass1.txt | 2 +- .../invokeOnClassObjectOfNestedClass2.kt | 2 +- .../invokeOnClassObjectOfNestedClass2.txt | 2 +- .../codegen/box/enum/classObjectInEnum.kt | 2 +- .../testData/codegen/box/enum/inclassobj.kt | 2 +- .../box/enum/innerWithExistingClassObject.kt | 2 +- .../codegen/box/extensionFunctions/kt4228.kt | 2 +- .../fieldRename/constructorAndClassObject.kt | 2 +- .../testData/codegen/box/functions/kt2716.kt | 2 +- .../box/innerNested/nestedClassObject.kt | 2 +- .../testData/codegen/box/objects/flist.kt | 2 +- .../testData/codegen/box/objects/kt1047.kt | 2 +- .../testData/codegen/box/objects/kt2719.kt | 2 +- .../testData/codegen/box/objects/kt535.kt | 2 +- .../testData/codegen/box/objects/kt560.kt | 2 +- .../testData/codegen/box/objects/kt640.kt | 2 +- .../box/properties/classObjectProperties.kt | 2 +- .../codegen/box/properties/kt1482_2279.kt | 2 +- .../testData/codegen/box/properties/kt3551.kt | 2 +- .../testData/codegen/box/properties/kt4140.kt | 2 +- .../testData/codegen/box/properties/kt4252.kt | 2 +- .../codegen/box/properties/kt4252_2.kt | 2 +- .../anonymousInitializerInClassObject.kt | 2 +- .../box/staticFields/incInClassObject.kt | 2 +- .../inheritedPropertyInClassObject.kt | 2 +- .../protectedStatic/funClassObject.kt | 2 +- .../codegen/boxInline/simple/classObject.2.kt | 2 +- .../codegen/boxInline/trait/trait.2.kt | 2 +- .../classObjectAccessor/classObject.kt | 4 +- .../annotations/simpleClassObject.kt | 2 +- .../classObject/simpleClassObject.kt | 2 +- .../classObjectProperties.kt | 6 +-- ...otlinPropertyFromClassObjectAsParameter.kt | 2 +- .../nestedClassPropertyAsParameter.kt | 2 +- .../kClassInstanceIsInitializedFirst.kt | 2 +- .../native/nativePropertyAccessors.kt | 2 +- .../boxWithStdlib/native/privateStatic.kt | 2 +- .../boxWithStdlib/native/staticNative.kt | 2 +- .../platformStatic/syntheticAccessor.kt | 2 +- .../enclosing/lambdaInClassObject.kt | 2 +- .../reflection/genericSignature/kt5112.kt | 4 +- .../reflection/genericSignature/kt6106.kt | 2 +- .../enumInsideClassObject.kt | 2 +- .../bytecodeText/staticFields/classObject.kt | 4 +- .../classObjectSyntheticAccessor.kt | 4 +- .../codegen/classes/classObjectInterface.kt | 2 +- .../classes/classObjectIsInnerClass.kt | 2 +- .../reflection/classInClassObject.kt | 2 +- .../codegen/innerClassInfo/innerClassInfo.kt | 2 +- .../noAssertionsForKotlin.kt | 2 +- .../codegen/outerClassInfo/outerClassInfo.kt | 2 +- .../privateClassPropertyAccessors.kt | 2 +- .../class/ClassObject.kt | 2 +- .../platformStatic/simpleClassObject.kt | 2 +- .../simpleClassObjectProperty.kt | 2 +- .../staticFields/AnnotationClass.kt | 2 +- .../staticFields/AnnotationTrait.kt | 2 +- .../staticFields/kt3698.kt | 2 +- .../staticFields/staticClassProperty.kt | 2 +- .../staticFields/staticTraitProperty.kt | 2 +- .../ClassObjectInEnum.A.kt | 2 +- .../ClassObjectMember.A.kt | 2 +- .../diagnostics/tests/MultipleBounds.kt | 2 +- .../diagnostics/tests/MultipleBounds.txt | 2 +- .../tests/annotations/annotationModifier.kt | 2 +- .../tests/annotations/annotationModifier.txt | 2 +- .../tests/annotations/kt1886annotationBody.kt | 2 +- .../annotations/kt1886annotationBody.txt | 2 +- .../tests/cast/WhenWithExpression.kt | 2 +- .../tests/cast/WhenWithExpression.txt | 2 +- .../ClassObjectCannotAccessClassFields.kt | 2 +- .../ClassObjectCannotAccessClassFields.txt | 2 +- .../classObjects/ClassObjectVisibility.kt | 6 +-- .../classObjects/ClassObjectVisibility.txt | 6 +-- .../tests/classObjects/ClassObjects.kt | 12 +++--- .../tests/classObjects/ClassObjects.txt | 12 +++--- .../InnerClassAccessThroughClassObject.kt | 2 +- .../InnerClassAccessThroughClassObject.txt | 2 +- .../classObjects/InnerClassClassObject.kt | 10 ++--- .../classObjects/InnerClassClassObject.txt | 10 ++--- .../tests/classObjects/classObjectHeader.kt | 2 +- .../tests/classObjects/classObjectHeader.txt | 2 +- .../classObjects/classObjectInLocalClass.kt | 4 +- .../classObjects/classObjectRedeclaration.kt | 6 +-- .../classObjects/classObjectRedeclaration.txt | 6 +-- .../classObjects/importClassInClassObject.kt | 2 +- .../classObjects/importClassInClassObject.txt | 2 +- .../classObjects/invisibleClassObjects.kt | 8 ++-- .../classObjects/invisibleClassObjects.txt | 8 ++-- .../diagnostics/tests/classObjects/kt3866.kt | 4 +- .../diagnostics/tests/classObjects/kt3866.txt | 4 +- .../multipleDissallowedDefaultObjects.txt | 12 +++--- .../nestedClassInPrivateClassObject.kt | 4 +- .../nestedClassInPrivateClassObject.txt | 4 +- .../resolveFunctionInsideClassObject.kt | 2 +- .../resolveFunctionInsideClassObject.txt | 2 +- .../UninitializedOrReassignedVariables.kt | 2 +- .../UninitializedOrReassignedVariables.txt | 2 +- .../tests/controlFlowAnalysis/kt1185enums.kt | 2 +- .../tests/controlFlowAnalysis/kt1185enums.txt | 2 +- .../SmartcastsForStableIdentifiers.kt | 2 +- .../SmartcastsForStableIdentifiers.txt | 2 +- .../illegalModifiersOnClass.kt | 8 ++-- .../illegalModifiersOnClass.txt | 8 ++-- .../tests/delegatedProperty/defaultSetter.txt | 2 +- .../functionAndProperty/classObject.kt | 2 +- .../functionAndProperty/classObject.txt | 2 +- .../specialNames/classObject.kt | 4 +- .../specialNames/classObject.txt | 4 +- .../specialNames/classObjectCopiedField.kt | 2 +- .../specialNames/classObjectCopiedField.txt | 2 +- .../classObjectCopiedFieldObject.kt | 4 +- .../classObjectCopiedFieldObject.txt | 4 +- .../tests/enum/classObjectInEnum.kt | 2 +- .../tests/enum/classObjectInEnum.txt | 2 +- .../tests/enum/classObjectInEnumPrivate.kt | 2 +- .../tests/enum/classObjectInEnumPrivate.txt | 2 +- .../enum/enumEntryCannotHaveClassObject.kt | 2 +- .../enum/enumEntryCannotHaveClassObject.txt | 2 +- .../diagnostics/tests/enum/enumModifier.kt | 2 +- .../diagnostics/tests/enum/enumModifier.txt | 2 +- .../tests/enum/inner/existingClassObject.kt | 4 +- .../tests/enum/inner/existingClassObject.txt | 4 +- .../tests/enum/inner/insideClassObject.kt | 2 +- .../tests/enum/inner/insideClassObject.txt | 2 +- .../enum/inner/redeclarationInClassObject.kt | 2 +- .../enum/inner/redeclarationInClassObject.txt | 2 +- .../twoEnumsInClassObjectAndInnerClass.kt | 2 +- .../twoEnumsInClassObjectAndInnerClass.txt | 2 +- .../enum/starImportNestedClassAndEntries.kt | 2 +- .../enum/starImportNestedClassAndEntries.txt | 2 +- .../valuesValueOfAndEntriesAccessibility.kt | 2 +- .../valuesValueOfAndEntriesAccessibility.txt | 2 +- .../tests/extensions/classObject.kt | 4 +- .../tests/extensions/classObject.txt | 4 +- .../extensionMemberInClassObject.kt | 2 +- .../extensionMemberInClassObject.txt | 2 +- .../diagnostics/tests/extensions/kt3470.kt | 2 +- .../diagnostics/tests/extensions/kt3470.txt | 2 +- .../diagnostics/tests/imports/Imports.kt | 12 +++--- .../diagnostics/tests/imports/Imports.txt | 6 +-- .../tests/imports/StarImportFromObject.kt | 2 +- .../tests/imports/StarImportFromObject.txt | 2 +- .../tests/inference/regressions/kt702.kt | 2 +- .../tests/inference/regressions/kt702.txt | 2 +- .../tests/inner/classesInClassObjectHeader.kt | 2 +- .../inner/classesInClassObjectHeader.txt | 2 +- .../diagnostics/tests/inner/deepInnerClass.kt | 2 +- .../inner/extensionLambdaInsideNestedClass.kt | 2 +- .../extensionLambdaInsideNestedClass.txt | 2 +- .../tests/inner/illegalModifier.kt | 4 +- .../tests/inner/illegalModifier.txt | 4 +- .../inner/innerClassesInStaticParameters.kt | 2 +- .../inner/innerClassesInStaticParameters.txt | 2 +- .../tests/inner/innerErrorForClassObjects.kt | 4 +- .../tests/inner/innerErrorForClassObjects.txt | 4 +- ...nestedClassAccessedViaInstanceReference.kt | 8 ++-- ...estedClassAccessedViaInstanceReference.txt | 8 ++-- .../classObjectOfNestedClass.kt | 4 +- .../classObjectOfNestedClass.txt | 4 +- .../inner/resolvePackageClassInObjects.kt | 2 +- .../inner/resolvePackageClassInObjects.txt | 2 +- .../inner/selfAnnotationForClassObject.kt | 2 +- .../inner/selfAnnotationForClassObject.txt | 2 +- .../tests/j+k/InnerClassFromJava.kt | 2 +- .../tests/j+k/InnerClassFromJava.txt | 2 +- .../tests/j+k/accessClassObjectFromJava.kt | 2 +- .../tests/j+k/accessClassObjectFromJava.txt | 2 +- .../diagnostics/tests/j+k/javaStaticImport.kt | 2 +- .../tests/j+k/javaStaticImport.txt | 2 +- .../tests/modifiers/defaultModifier.txt | 20 +++++----- .../duplicateClass/duplicateNestedClasses.kt | 4 +- .../duplicateClass/duplicateNestedClasses.txt | 4 +- .../tests/objects/invokeOnInnerObject.kt | 2 +- .../tests/objects/invokeOnInnerObject.txt | 2 +- .../tests/objects/upperBoundViolated.kt | 2 +- .../tests/objects/upperBoundViolated.txt | 2 +- .../overload/ConstructorVsFunOverload.kt | 4 +- .../overload/ConstructorVsFunOverload.txt | 4 +- .../tests/override/kt4785classObject.kt | 2 +- .../tests/override/kt4785classObject.txt | 2 +- .../EnumEntriesAndClassObjectMembers.kt | 2 +- .../EnumEntriesAndClassObjectMembers.txt | 2 +- .../redeclarations/PropertyAndInnerClass.kt | 2 +- .../redeclarations/PropertyAndInnerClass.txt | 2 +- .../tests/redeclarations/kt2247.kt | 4 +- .../tests/redeclarations/kt2247.txt | 2 +- .../tests/redeclarations/kt2438.kt | 2 +- .../tests/redeclarations/kt2438.txt | 2 +- .../diagnostics/tests/regressions/kt3647.kt | 2 +- .../diagnostics/tests/regressions/kt3647.txt | 2 +- .../diagnostics/tests/regressions/kt394.kt | 4 +- .../diagnostics/tests/regressions/kt394.txt | 2 +- .../kt526UnresolvedReferenceInnerStatic.kt | 2 +- .../kt526UnresolvedReferenceInnerStatic.txt | 2 +- .../diagnostics/tests/regressions/kt575.kt | 4 +- .../diagnostics/tests/regressions/kt575.txt | 2 +- .../diagnostics/tests/regressions/kt588.kt | 2 +- .../diagnostics/tests/regressions/kt588.txt | 2 +- .../diagnostics/tests/regressions/kt701.kt | 2 +- .../diagnostics/tests/regressions/kt701.txt | 2 +- .../invoke/kt3833-invokeInsideNestedClass.kt | 4 +- .../invoke/kt3833-invokeInsideNestedClass.txt | 2 +- .../analyzeArgsInFreeExpressionPosition.kt | 2 +- .../analyzeArgsInFreeExpressionPosition.txt | 2 +- .../tests/scopes/VisibilityInClassObject.kt | 2 +- .../tests/scopes/VisibilityInClassObject.txt | 2 +- .../diagnostics/tests/scopes/kt587.kt | 4 +- .../diagnostics/tests/scopes/kt587.txt | 4 +- .../diagnostics/tests/scopes/kt900-1.kt | 6 +-- .../diagnostics/tests/scopes/kt900-1.txt | 4 +- .../diagnostics/tests/scopes/kt900.kt | 8 ++-- .../diagnostics/tests/scopes/kt900.txt | 8 ++-- .../tests/smartCasts/classObjectMember.kt | 4 +- .../tests/smartCasts/classObjectMember.txt | 4 +- .../diagnostics/tests/subtyping/kt2069.kt | 2 +- .../diagnostics/tests/subtyping/kt2069.txt | 2 +- .../suppressWarningsOnClassObject.kt | 2 +- .../suppressWarningsOnClassObject.txt | 2 +- .../suppress/manyWarnings/onClassObject.kt | 2 +- .../suppress/manyWarnings/onClassObject.txt | 2 +- .../suppress/oneWarning/onClassObject.kt | 2 +- .../suppress/oneWarning/onClassObject.txt | 2 +- .../variance/privateToThis/FunctionCall.kt | 2 +- .../variance/privateToThis/FunctionCall.txt | 2 +- .../tests/variance/privateToThis/GetVal.kt | 2 +- .../tests/variance/privateToThis/GetVal.txt | 2 +- .../tests/variance/privateToThis/SetVar.kt | 2 +- .../tests/variance/privateToThis/SetVar.txt | 2 +- .../nativeGetter/onNativeClassMembers.kt | 6 +-- .../nativeGetter/onNativeClassMembers.txt | 6 +-- .../onNestedDeclarationsInsideNativeClass.kt | 4 +- .../onNestedDeclarationsInsideNativeClass.txt | 4 +- ...nNestedDeclarationsInsideNonNativeClass.kt | 4 +- ...NestedDeclarationsInsideNonNativeClass.txt | 4 +- .../nativeGetter/onNonNativeClassMembers.kt | 4 +- .../nativeGetter/onNonNativeClassMembers.txt | 4 +- .../nativeInvoke/onNativeClassMembers.kt | 2 +- .../nativeInvoke/onNativeClassMembers.txt | 2 +- .../onNestedDeclarationsInsideNativeClass.kt | 2 +- .../onNestedDeclarationsInsideNativeClass.txt | 2 +- ...nNestedDeclarationsInsideNonNativeClass.kt | 2 +- ...NestedDeclarationsInsideNonNativeClass.txt | 2 +- .../nativeInvoke/onNonNativeClassMembers.kt | 2 +- .../nativeInvoke/onNonNativeClassMembers.txt | 2 +- .../nativeSetter/onNativeClassMembers.kt | 4 +- .../nativeSetter/onNativeClassMembers.txt | 4 +- .../onNestedDeclarationsInsideNativeClass.kt | 4 +- .../onNestedDeclarationsInsideNativeClass.txt | 4 +- ...nNestedDeclarationsInsideNonNativeClass.kt | 4 +- ...NestedDeclarationsInsideNonNativeClass.txt | 4 +- .../nativeSetter/onNonNativeClassMembers.kt | 4 +- .../nativeSetter/onNonNativeClassMembers.txt | 4 +- .../native/optionlBody/native.kt | 4 +- .../native/optionlBody/native.txt | 4 +- .../ClassObjectAnnotatedWithItsClass.kt | 2 +- .../ClassObjectAnnotatedWithItsClass.txt | 2 +- .../annotations/platformStatic/functions.kt | 4 +- .../annotations/platformStatic/functions.txt | 4 +- .../annotations/platformStatic/property.kt | 2 +- .../annotations/platformStatic/property.txt | 2 +- .../function/innerConstructorFromClass.kt | 2 +- .../function/innerConstructorFromClass.txt | 2 +- .../function/nestedConstructorFromClass.kt | 2 +- .../function/nestedConstructorFromClass.txt | 2 +- .../platformStaticInClassObject.kt | 2 +- .../platformStaticInClassObject.txt | 2 +- .../testsWithStdLib/native/body.kt | 2 +- .../testsWithStdLib/native/body.txt | 2 +- .../testsWithStdLib/native/noBody.kt | 2 +- .../testsWithStdLib/native/noBody.txt | 2 +- .../testsWithStdLib/native/trait.kt | 2 +- .../testsWithStdLib/native/trait.txt | 2 +- .../evaluate/constant/classObjectProperty.kt | 2 +- compiler/testData/lineNumber/classObject.kt | 2 +- .../classMembers/ClassObjectPropertyField.kt | 2 +- .../classMembers/ClassObjectPropertyField.txt | 2 +- .../classes/AnnotationInClassObject.kt | 2 +- .../classes/AnnotationInClassObject.txt | 2 +- .../annotations/classes/ClassInClassObject.kt | 2 +- .../classes/ClassInClassObject.txt | 2 +- .../annotations/classes/ClassObject.kt | 2 +- .../annotations/classes/ClassObject.txt | 2 +- .../classes/ClassObjectInStaticNestedClass.kt | 2 +- .../ClassObjectInStaticNestedClass.txt | 2 +- .../annotations/classes/Deprecated.kt | 2 +- .../annotations/classes/Deprecated.txt | 2 +- .../annotations/classes/EnumArgument.kt | 2 +- .../annotations/classes/EnumArgument.txt | 2 +- .../ClassObject.kt | 2 +- .../ClassObject.txt | 2 +- .../TraitClassObject.kt | 2 +- .../TraitClassObject.txt | 2 +- .../class/ClassMemberConflict.kt | 10 ++--- .../class/ClassMemberConflict.txt | 10 ++--- .../class/NamedObjectInClassObject.kt | 2 +- .../class/NamedObjectInClassObject.txt | 2 +- .../classObject/ClassObjectDeclaresVal.kt | 2 +- .../classObject/ClassObjectDeclaresVal.txt | 2 +- .../classObject/ClassObjectDeclaresVar.kt | 2 +- .../classObject/ClassObjectDeclaresVar.txt | 2 +- .../ClassObjectDefaultVisibility.kt | 6 +-- .../ClassObjectDefaultVisibility.txt | 6 +-- .../ClassObjectExplicitVisibility.kt | 18 ++++----- .../ClassObjectExplicitVisibility.txt | 18 ++++----- .../classObject/ClassObjectExtendsTrait.kt | 2 +- .../classObject/ClassObjectExtendsTrait.txt | 2 +- .../ClassObjectExtendsTraitWithTP.kt | 2 +- .../ClassObjectExtendsTraitWithTP.txt | 2 +- .../classObject/ClassObjectPropertyInClass.kt | 2 +- .../ClassObjectPropertyInClass.txt | 2 +- .../compiledKotlin/classObject/Delegation.kt | 2 +- .../compiledKotlin/classObject/Delegation.txt | 2 +- .../classObject/InnerClassInClassObject.kt | 2 +- .../classObject/InnerClassInClassObject.txt | 2 +- .../classObject/NamedClassObject.kt | 2 +- .../classObject/NamedClassObject.txt | 2 +- .../classObject/SimpleClassObject.kt | 2 +- .../classObject/SimpleClassObject.txt | 2 +- .../classObjectInClassStaticFields.kt | 2 +- .../classObjectInClassStaticFields.txt | 2 +- .../classObjectInTraitStaticFields.kt | 2 +- .../classObjectInTraitStaticFields.txt | 2 +- .../enum/innerEnumExistingClassObject.kt | 2 +- .../enum/innerEnumExistingClassObject.txt | 2 +- .../fromLoadJava/ClassObject.kt | 2 +- .../fromLoadJava/ClassObject.txt | 2 +- .../fromLoadJava/classObjectAnnotation.kt | 2 +- .../fromLoadJava/classObjectAnnotation.txt | 2 +- compiler/testData/psi/ByClauses.kt | 14 +++---- compiler/testData/psi/ByClauses.txt | 21 ++++++---- compiler/testData/psi/CommentsBinding.kt | 6 +-- compiler/testData/psi/CommentsBinding.txt | 7 ++-- compiler/testData/psi/NamedClassObject.kt | 8 ++-- compiler/testData/psi/NamedClassObject.txt | 12 ++++-- compiler/testData/psi/SimpleClassMembers.kt | 20 +++++----- compiler/testData/psi/SimpleClassMembers.txt | 38 ++++++++++--------- .../psi/annotation/ShortAnnotations.kt | 2 +- .../psi/annotation/ShortAnnotations.txt | 4 +- .../psi/examples/PolymorphicClassObjects.kt | 2 +- .../psi/examples/PolymorphicClassObjects.txt | 3 +- .../testData/psi/examples/UpdateOperation.kt | 2 +- .../testData/psi/examples/UpdateOperation.txt | 3 +- compiler/testData/psi/recovery/kt2172.kt | 2 +- compiler/testData/psi/recovery/kt2172.txt | 3 +- compiler/testData/psiUtil/isLocalClass.kt | 2 +- .../recursiveProcessor/declarations.kt | 4 +- compiler/testData/renderer/Classes.kt | 4 +- .../classObjectOuterResolve.resolve | 2 +- .../ImportConflictWithClassObject.resolve | 2 +- .../testData/resolveAnnotations/testFile.kt | 2 +- .../invoke/invokeOnClassObject1.kt | 2 +- .../invoke/invokeOnClassObject1.txt | 4 +- .../invoke/invokeOnClassObject2.kt | 2 +- .../invoke/invokeOnClassObject2.txt | 2 +- .../objectsAndClassObjects/classObject.kt | 2 +- .../objectsAndClassObjects/classObject.txt | 2 +- .../builtinsSerializer/annotationTargets.kt | 4 +- .../builtinsSerializer/annotationTargets.txt | 2 +- .../class/deprecatedFlag/classObject.kt | 2 +- .../class/visibility/private/innerEnum.kt | 2 +- .../function/classObjectPrivate/privateFun.kt | 2 +- .../function/classObjectPrivate/privateVal.kt | 2 +- .../function/classObjectPrivate/privateVar.kt | 2 +- .../function/constructors/classObject.kt | 2 +- .../deprecatedFlag/funInClassObject.kt | 2 +- .../visibility/internalClassObject.kt | 2 +- .../visibility/privateClassObject.kt | 2 +- .../visibility/publicClassObject.kt | 2 +- .../class/delegatedProtectedVar.kt | 2 +- .../classObject/class/delegatedPublicVal.kt | 2 +- .../property/classObject/class/internalVal.kt | 2 +- .../property/classObject/class/internalVar.kt | 2 +- .../class/internalVarPrivateSet.kt | 2 +- .../classObject/class/noBackingField.kt | 2 +- .../property/classObject/class/privateVal.kt | 2 +- .../property/classObject/class/privateVar.kt | 2 +- .../classObject/class/protectedVal.kt | 2 +- .../class/protectedVarPrivateSet.kt | 2 +- .../property/classObject/class/publicVal.kt | 2 +- .../classObject/class/publicValNonDefault.kt | 2 +- .../property/classObject/class/publicVar.kt | 2 +- .../classObject/class/publicVarNonDefault.kt | 2 +- .../classObject/class/publicVarPrivateSet.kt | 2 +- .../class/publicVarProtectedSet.kt | 2 +- .../classObject/class/publicVarPublicSet.kt | 2 +- .../rename/constructorAndClassObject.kt | 2 +- .../rename/delegatedAndDelegated.kt | 2 +- .../rename/delegatedAndProperty.kt | 2 +- .../classObject/rename/propertyAndProperty.kt | 2 +- .../trait/delegatedProtectedVar.kt | 2 +- .../classObject/trait/delegatedPublicVal.kt | 2 +- .../property/classObject/trait/internalVal.kt | 2 +- .../property/classObject/trait/internalVar.kt | 2 +- .../trait/internalVarPrivateSet.kt | 2 +- .../classObject/trait/noBackingField.kt | 2 +- .../property/classObject/trait/privateVal.kt | 2 +- .../property/classObject/trait/privateVar.kt | 2 +- .../classObject/trait/protectedVal.kt | 2 +- .../trait/protectedVarPrivateSet.kt | 2 +- .../property/classObject/trait/publicVal.kt | 2 +- .../classObject/trait/publicValNonDefault.kt | 2 +- .../property/classObject/trait/publicVar.kt | 2 +- .../classObject/trait/publicVarNonDefault.kt | 2 +- .../classObject/trait/publicVarPrivateSet.kt | 2 +- .../trait/publicVarProtectedSet.kt | 2 +- .../classObject/trait/publicVarPublicSet.kt | 2 +- .../renderer/DescriptorRendererImpl.java | 4 +- .../tests/generateTestDataForReservedWords.kt | 6 +-- .../KotlinSuppressableWarningProblemGroup.kt | 2 +- ...ctingNameAppearsAndHasUsage4.dependency.kt | 2 +- idea/testData/checker/Builders.kt | 6 +-- idea/testData/checker/ClassObjectInEnum.kt | 2 +- idea/testData/checker/ClassObjects.kt | 6 +-- idea/testData/checker/MultipleBounds.kt | 2 +- .../checker/PlatformStaticUsagesRuntime.kt | 4 +- .../fields/classObjectCopiedFieldObject.kt | 2 +- .../functionAndProperty/classObject.kt | 2 +- .../extensionMemberInClassObject.kt | 2 +- .../ClassObjectInStaticNestedClass.kt | 2 +- .../common/ExtensionFunctionInClassObject.kt | 2 +- .../completion/basic/common/InClassObject.kt | 2 +- .../completion/basic/common/InNestedClass.kt | 2 +- .../NestedClassesOnClassWithDefaultObject.kt | 2 +- ...tedClassesOnClassWithNamedDefaultObject.kt | 2 +- .../NestedClassesOnDefaultObjectLiteral.kt | 2 +- .../basic/common/OverloadFunctions.kt | 2 +- .../common/classObjectElementsInClass.kt | 2 +- .../ExtensionOnNestedClassObject.kt | 2 +- .../common/extensions/NoExtensionFromOuter.kt | 2 +- .../NotImportedObject.dependency.kt | 2 +- .../handlers/ClassFromClassObject.kt | 2 +- .../handlers/ClassFromClassObject.kt.after | 2 +- .../handlers/ClassFromClassObjectInPackage.kt | 2 +- .../ClassFromClassObjectInPackage.kt.after | 2 +- .../handlers/ExistingSingleBrackets.kt | 2 +- .../handlers/ExistingSingleBrackets.kt.after | 2 +- .../completion/handlers/SingleBrackets.kt | 2 +- .../handlers/SingleBrackets.kt.after | 2 +- .../handlers/basic/ClassWithClassObject.kt | 2 +- .../basic/ClassWithClassObject.kt.after | 2 +- .../multifile/ClassWithClassObject-2.kt | 2 +- .../handlers/smart/ClassInClassObject.kt | 2 +- .../smart/ClassInClassObject.kt.after | 2 +- .../smart/ClassObjectFieldKeywordName.kt | 2 +- .../ClassObjectFieldKeywordName.kt.after | 2 +- .../handlers/smart/ClassObjectMethod1.kt | 2 +- .../smart/ClassObjectMethod1.kt.after | 2 +- .../handlers/smart/ClassObjectMethod2.kt | 2 +- .../smart/ClassObjectMethod2.kt.after | 2 +- .../handlers/smart/ClassObjectMethod3.kt | 2 +- .../smart/ClassObjectMethod3.kt.after | 2 +- .../handlers/smart/ClassObjectMethod4.kt | 2 +- .../smart/ClassObjectMethod4.kt.after | 2 +- .../completion/handlers/smart/MergeTail3.kt | 2 +- .../handlers/smart/MergeTail3.kt.after | 2 +- .../completion/handlers/smart/MergeTail4.kt | 2 +- .../handlers/smart/MergeTail4.kt.after | 2 +- .../handlers/smart/NullableValue3.kt | 2 +- .../handlers/smart/NullableValue3.kt.after | 2 +- .../completion/injava/mockLib/main.kt | 6 +-- .../completion/smart/ClassObjectMembers.kt | 2 +- .../smart/ClassObjectMembersForNullable.kt | 2 +- .../smart/ClassObjectMembersWithPrefix.kt | 2 +- .../completion/smart/InClassObject.kt | 2 +- .../smart/NoExtensionMethodFromClassObject.kt | 2 +- .../completion/smart/functionReference/10.kt | 2 +- .../smart/generics/GenericFunction5.kt | 2 +- .../smart/NoNameSimilarityForQualifier.kt | 2 +- .../weighers/smart/NullableExpected.kt | 2 +- .../weighers/smart/SmartPriority2.kt | 2 +- .../imports/AlreadyImportedViaStar.kt | 2 +- .../testData/copyPaste/imports/ClassObject.kt | 4 +- .../imports/ClassObjectFunInsideClass.kt | 2 +- .../copyPaste/imports/ClassObjectInner.kt | 2 +- .../imports/ClassResolvedToPackage.kt | 2 +- .../imports/ImportDependency.dependency.kt | 2 +- .../imports/KotlinLibrary/Dependency.kt | 2 +- .../imports/NoImportForSamePackage.kt | 2 +- .../ReferencedElementAlsoCopied.expected.kt | 2 +- .../imports/ReferencedElementAlsoCopied.kt | 2 +- .../debugger/positionManager/classObject.kt | 4 +- .../tinyApp/outs/frameClassObject.out | 2 +- .../singleBreakpoint/classObjectVal.kt | 2 +- .../singleBreakpoint/dependentOnFile.kt | 2 +- .../frame/frameClassObject.kt | 2 +- .../src/stepInto/stepInto/accessors.kt | 2 +- .../src/stepInto/stepInto/syntheticMethods.kt | 2 +- .../classObjectFunFromClass.kt | 2 +- .../classObjectFunFromTopLevel.kt | 2 +- .../ClassWithClassObject.expected.kt | 2 +- .../ClassWithClassObject.kt | 2 +- .../DependencyOnNestedClasses/Dependency.kt | 2 +- .../decompiled/WithInnerAndObject.kt | 2 +- .../decompiled/WithTraitClassObject.kt | 2 +- .../decompiler/navigation/library/main.kt | 4 +- .../navigation/usercode/ClassObject.kt | 2 +- .../stubBuilder/Annotations/Annotations.kt | 2 +- .../stubBuilder/ClassObject/ClassObject.kt | 8 ++-- .../DependencyOnNestedClasses/Dependency.kt | 2 +- .../decompiler/stubBuilder/Enum/Enum.kt | 2 +- .../nestedClassAcessedViaInstanceReference.kt | 2 +- ...estedClassAcessedViaInstanceReference2.txt | 2 +- .../nestedClassShouldBeQualified.kt | 4 +- .../nestedClassShouldBeQualified5.txt | 2 +- .../DefaultObjectReference.dependency.kt | 4 +- .../testData/editor/optimizeImports/Kt2709.kt | 2 +- .../editor/optimizeImports/Kt2709.kt.after | 2 +- .../editor/optimizeImports/MembersInScope.kt | 2 +- .../optimizeImports/MembersInScope.kt.after | 2 +- .../findJavaClassUsages/JKClassAllUsages.1.kt | 2 +- .../JKClassAllUsages.results.txt | 2 +- .../JKClassFieldsUsages.1.kt | 2 +- .../JKClassMethodsUsages.1.kt | 2 +- .../JKClassMethodsUsages.results.txt | 2 +- ...ClassWithImplicitConstructorAllUsages.1.kt | 2 +- ...thImplicitConstructorAllUsages.results.txt | 2 +- .../JKNestedClassAllUsages.1.kt | 2 +- .../JKNestedClassAllUsages.results.txt | 2 +- .../findClassUsages/classUsedInTextAsRef.0.kt | 2 +- .../findClassUsages/kotlinClassAllUsages.0.kt | 2 +- .../findClassUsages/kotlinClassAllUsages.1.kt | 2 +- .../kotlinClassAllUsages.results.txt | 2 +- .../kotlinClassConstructorUsages.0.kt | 2 +- .../kotlinClassNonConstructorUsages.0.kt | 2 +- .../kotlinDeeplyNestedClassAllUsages.0.kt | 2 +- .../kotlinDeeplyNestedClassAllUsages.1.kt | 2 +- ...tlinDeeplyNestedClassAllUsages.results.txt | 2 +- .../kotlinNestedClassAllUsages.0.kt | 2 +- .../kotlinNestedClassAllUsages.1.kt | 2 +- .../kotlinNestedClassAllUsages.results.txt | 2 +- .../javaClassObjectPropertyUsages.0.kt | 2 +- .../kotlinClassObjectPropertyUsage.0.kt | 2 +- ...linPrivatePropertyInClassObjectUsages.0.kt | 2 +- .../kotlinClassAllUsages.0.kt | 2 +- .../kotlinClassAllUsages.1.kt | 2 +- .../kotlinClassAllUsages.results.txt | 2 +- .../formatter/ClassLineBreak.after.inv.kt | 4 +- .../formatter/ClassLineBreak.after.kt | 4 +- idea/testData/formatter/ClassLineBreak.kt | 4 +- .../formatter/EmptyBlocks.after.inv.kt | 4 +- idea/testData/formatter/EmptyBlocks.kt | 4 +- ...aceAroundExtendColonInObjects.after.inv.kt | 4 +- .../SpaceAroundExtendColonInObjects.after.kt | 4 +- .../SpaceAroundExtendColonInObjects.kt | 4 +- .../calls/callers/kotlinClass/main0.kt | 2 +- .../calls/callers/kotlinFunction/main0.kt | 2 +- .../calls/callers/kotlinNestedClass/main0.kt | 2 +- .../callers/kotlinNestedInnerClass/main0.kt | 2 +- .../callers/kotlinPackageFunction/main0.kt | 2 +- .../callers/kotlinPackageProperty/main0.kt | 2 +- .../calls/callers/kotlinProperty/main0.kt | 2 +- .../class/type/ClassInClassObject/main.kt | 2 +- .../highlighter/deprecated/ClassObject.kt | 4 +- .../highlighter/deprecated/Function.kt | 2 +- .../highlighter/deprecated/Property.kt | 2 +- .../unusedSymbol/object/defaultObject.kt | 6 +-- idea/testData/javaFacade/classObject.kt | 2 +- ...lassWithObjectLiteralInClassObjectField.kt | 2 +- .../javaFacade/wrapFunInClassObject.kt | 2 +- .../kotlinAndJavaChecker/ClassObjects.kt | 2 +- .../navigation/gotoClass/inClassObject.kt | 2 +- .../navigation/gotoSymbol/properties.kt | 2 +- .../ExtensionOnClassObject.kt | 2 +- ...nQualifiedExpression.before.data.Sample.kt | 2 +- .../call/afterFunOnClassObject.kt | 2 +- .../call/beforeFunOnClassObject.kt | 2 +- .../beforeInAccessorInClassObject.kt | 2 +- .../beforeInClassObjectInitializer.kt | 2 +- ...eforeInPropertyInitializerInClassObject.kt | 2 +- .../property/afterValOnClassObject.kt | 2 +- .../property/beforeValOnClassObject.kt | 2 +- .../declarationKinds/afterClassObject.kt | 4 +- .../declarationKinds/beforeClassObject.kt | 4 +- .../basic/privateMemberInClassObject.kt | 2 +- .../parameters/misc/classObject.kt | 2 +- .../parameters/misc/classObject.kt.after | 2 +- .../parameters/misc/innerClassObject.kt | 2 +- .../parameters/misc/innerClassObject.kt.after | 2 +- .../parameters/misc/qualifiedClassObject.kt | 2 +- .../misc/qualifiedClassObject.kt.after | 2 +- .../inline/property/ClassObjectProperty.kt | 2 +- .../property/ClassObjectProperty.kt.after | 2 +- .../after/library/KtClass.kt | 6 +-- .../singletonsAndStatics/after/source/Foo.kt | 2 +- .../before/library/KtClass.kt | 6 +-- .../singletonsAndStatics/before/source/Foo.kt | 2 +- .../referenceInJava/ClassObjectField.java | 2 +- .../DeprecatedClassObjectField.java | 2 +- .../resolve/referenceInJava/dependencies.kt | 4 +- .../ClassObjectClassLiteralReference.kt | 2 +- ...assObjectClassLiteralReferenceWithField.kt | 2 +- ...sQualifierForNestedClassConstructorCall.kt | 2 +- ...ultObjectAsExtensionReceiverForFunction.kt | 4 +- ...ultObjectAsExtensionReceiverForProperty.kt | 4 +- ...ReceiverForExtensionFunctionOnSuperType.kt | 4 +- ...tAsReceiverForMemberPropertyInSuperType.kt | 4 +- .../DefaultObjectInShortReferenceFormCall.kt | 4 +- .../resolve/references/InObjectClassObject.kt | 2 +- .../resolve/references/InSecondClassObject.kt | 4 +- .../resolve/references/NamedClassObject.kt | 4 +- .../PropertyPlaceInClassObjectInObject.kt | 2 +- .../run/ClassesAndObjects/module/src/test.kt | 6 +-- .../annotations/testAnnotationsOnFunction.kt | 2 +- idea/testData/shortenRefs/classObject.kt | 4 +- .../testData/shortenRefs/classObject.kt.after | 4 +- .../structureView/fileStructure/Render.after | 2 +- .../structureView/fileStructure/Render.kt | 2 +- idea/testData/stubs/ClassObject.expected | 1 + idea/testData/stubs/ClassObject.kt | 2 +- .../declarations/classesAndObjects/members.kt | 10 ++--- .../classesAndObjects/members.kt.match | 4 +- .../kotlin/idea/actions/QualifiedNamesTest.kt | 2 +- .../kotlin/idea/stubs/DebugTextByStubTest.kt | 5 +-- .../jetbrains/kotlin/test/ReferenceUtils.java | 2 +- .../kotlin/j2k/ClassBodyConverter.kt | 2 +- .../org/jetbrains/kotlin/j2k/ast/ClassBody.kt | 2 +- j2k/testData/KotlinApi.kt | 2 +- .../annotations/annotationInterface3.kt | 4 +- .../anonymousBlock/oneStaticAnonBlock.kt | 2 +- .../callChainExpression/libraryFieldCall.kt | 2 +- .../callChainExpression/libraryMethodCall.kt | 2 +- .../fileOrElement/class/ClassShadowing.kt | 4 +- .../class/oneStaticFieldOneNonStatic.kt | 2 +- .../fileOrElement/class/oneStaticMethod.kt | 2 +- .../class/oneStaticMethodOneNonStatic.kt | 2 +- .../fileOrElement/class/twoStaticMethod.kt | 2 +- .../classExpression/primitivesAndArrays.kt | 2 +- .../fileOrElement/comments/comments2.kt | 2 +- .../constructors/allCallsPrimary.kt | 2 +- .../constructors/allCallsPrimary2.kt | 2 +- .../fileOrElement/constructors/chain.kt | 2 +- .../constructors/customerBuilder.kt | 2 +- .../constructors/genericIdentifier.kt | 2 +- .../fileOrElement/constructors/identifier.kt | 2 +- .../constructors/methodCallInFactoryFun.kt | 2 +- .../nestedClassNameInParameterDefaults.kt | 2 +- .../nestedClassNameInParameterDefaults2.kt | 2 +- .../nestedClassNameInParameterDefaults3.kt | 2 +- .../nestedClassNameInParameterDefaults4.kt | 2 +- .../nestedClassNameInSuperParameters.kt | 2 +- .../fileOrElement/constructors/noPrimary.kt | 2 +- .../constructors/parameterModification.kt | 2 +- .../secondaryConstructorsInNestedClass.kt | 2 +- .../staticFieldRefInFactoryFun.kt | 2 +- .../constructors/withManyDefaultParams.kt | 4 +- .../fileOrElement/field/conversion.kt | 2 +- .../staticAndNonStaticMembersWithComments.kt | 2 +- .../formatting/staticMembersWithComments.kt | 2 +- j2k/testData/fileOrElement/function/main.kt | 2 +- j2k/testData/fileOrElement/function/main2.kt | 2 +- .../function/mainAndNullabilitySetting.kt | 2 +- .../fileOrElement/issues/arrayLength.kt | 2 +- .../issues/doNotQualifyStatic.kt | 2 +- j2k/testData/fileOrElement/issues/kt-1074.kt | 2 +- j2k/testData/fileOrElement/issues/kt-638.kt | 2 +- j2k/testData/fileOrElement/issues/kt-807.kt | 2 +- .../fileOrElement/issues/kt-809-string.kt | 2 +- j2k/testData/fileOrElement/issues/kt-809.kt | 2 +- .../fileOrElement/issues/kt-820-field.kt | 2 +- .../fileOrElement/issues/kt-820-string.kt | 2 +- j2k/testData/fileOrElement/issues/kt-820.kt | 2 +- .../fileOrElement/issues/kt-824-isDir.kt | 2 +- j2k/testData/fileOrElement/issues/kt-824.kt | 2 +- j2k/testData/fileOrElement/issues/kt-837.kt | 2 +- j2k/testData/fileOrElement/issues/kt-871.kt | 2 +- j2k/testData/fileOrElement/issues/kt-879.kt | 2 +- .../methodCallExpression/vararg1.kt | 2 +- .../MethodResultInitializesNullableField.kt | 2 +- .../staticMembers/PrivateStaticMembers.kt | 2 +- .../staticMembers/PrivateStaticMethods2.kt | 2 +- .../staticMembers/PrivateStaticMethods3.kt | 2 +- .../switch/comlicatedFallDown.kt | 2 +- .../fileOrElement/switch/emptySwitch.kt | 2 +- j2k/testData/fileOrElement/switch/fallDown.kt | 2 +- .../switch/fallDownWithBlocks.kt | 2 +- j2k/testData/fileOrElement/switch/kt-539.kt | 2 +- .../fileOrElement/switch/nondefault.kt | 2 +- .../trait/interfaceWithFields.kt | 2 +- .../trait/interfaceWithStaticFields.kt | 2 +- .../typeParameters/rawTypeCast.kt | 2 +- .../kotlinConstantChangedUsedInJava/const.kt | 2 +- .../const.kt.new | 2 +- .../const.kt | 2 +- .../const.kt.new | 2 +- .../classObjectConstantChanged/const.kt | 2 +- .../classObjectConstantChanged/const.kt.new | 2 +- .../pureKotlin/constantsUnchanged/const.kt | 2 +- .../constantsUnchanged/const.kt.new | 2 +- .../traitClassObjectConstantChanged/const.kt | 2 +- .../const.kt.new | 2 +- .../kotlinUsedInJava/constantChanged/const.kt | 2 +- .../constantChanged/const.kt.new | 2 +- .../constantUnchanged/const.kt | 2 +- .../constantUnchanged/const.kt.new | 2 +- js/js.libraries/src/core/dom.kt | 8 ++-- js/js.libraries/src/core/domEvents.kt | 4 +- .../declaration/ClassTranslator.java | 4 +- .../cases/kClassInstanceIsInitializedFirst.kt | 2 +- .../testData/classObject/cases/accessing.kt | 2 +- .../testData/classObject/cases/inTrait.kt | 2 +- .../classObject/cases/namedClassObject.kt | 4 +- .../testData/classObject/cases/setVar.kt | 2 +- .../testData/classObject/cases/simple.kt | 2 +- .../classObject/cases/withInheritance.kt | 4 +- .../testData/closure/cases/closureInObject.kt | 2 +- .../cases/closureThisAndClassObject.kt | 2 +- .../sortedTests/unsupported/classObject.kt | 2 +- .../unsupported/classObjectInterface.kt | 2 +- .../unsupported/classObjectMethod.kt | 4 +- .../testData/inline/cases/classObject.kt | 2 +- .../inlineMultiFile/cases/trait/trait.2.kt | 2 +- .../testData/native/cases/classObject.kt | 2 +- .../testData/native/cases/nestedElements.kt | 18 ++++----- .../testData/native/cases/vararg.kt | 2 +- .../testData/object/cases/objectInObject.kt | 2 +- .../cases/insideClassObjectFunEnum.kt | 2 +- .../cases/insideClassObjectFunEval.kt | 2 +- .../cases/insideClassObjectFunFor.kt | 2 +- .../cases/insideClassObjectFunIf.kt | 2 +- .../cases/insideClassObjectFunParamExport.kt | 2 +- .../cases/insideClassObjectFunParamExtends.kt | 2 +- .../cases/insideClassObjectFunParamIn.kt | 2 +- .../cases/insideClassObjectFunParamNull.kt | 2 +- .../cases/insideClassObjectLabelFinally.kt | 2 +- .../cases/insideClassObjectLabelFunction.kt | 2 +- .../cases/insideClassObjectLabelPackage.kt | 2 +- .../cases/insideClassObjectLabelReturn.kt | 2 +- .../cases/insideClassObjectValConst.kt | 2 +- .../cases/insideClassObjectValContinue.kt | 2 +- .../cases/insideClassObjectValDebugger.kt | 2 +- .../cases/insideClassObjectValDo.kt | 2 +- .../cases/insideClassObjectVarDefault.kt | 2 +- .../cases/insideClassObjectVarDelete.kt | 2 +- .../cases/insideClassObjectVarElse.kt | 2 +- .../cases/insideClassObjectVarFalse.kt | 2 +- .../cases/toplevelClassDelete.kt | 2 +- .../reservedWords/cases/toplevelClassEnum.kt | 2 +- .../cases/toplevelClassPackage.kt | 2 +- .../cases/toplevelClassReturn.kt | 2 +- .../reservedWords/cases/toplevelTraitEval.kt | 2 +- .../cases/toplevelTraitExport.kt | 2 +- .../reservedWords/cases/toplevelTraitSuper.kt | 2 +- .../reservedWords/cases/toplevelTraitThis.kt | 2 +- .../sandbox/templatelib/src/TemplateHtml.kt | 20 +++++----- .../templatelib/test/TemplateHtmlTest.kt | 2 +- .../src/kotlin/concurrent/FunctionalList.kt | 2 +- .../test/kotlin/tests/SeleniumTestSuite.kt | 2 +- .../src/generators/GenerateJavaScriptStubs.kt | 2 +- .../codegen/android/fqNameInAttr/0.kt | 2 +- .../codegen/android/fqNameInAttr/1.kt | 2 +- .../testData/codegen/android/fqNameInTag/0.kt | 2 +- .../testData/codegen/android/fqNameInTag/1.kt | 2 +- .../testData/codegen/android/multiFile/0.kt | 2 +- .../testData/codegen/android/multiFile/1.kt | 2 +- .../testData/codegen/android/singleFile/0.kt | 2 +- .../testData/codegen/android/singleFile/1.kt | 2 +- spec-docs/jvm-native-flag-support.md | 2 +- 794 files changed, 1120 insertions(+), 1109 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/DebugTextUtil.kt b/compiler/frontend/src/org/jetbrains/kotlin/psi/DebugTextUtil.kt index 8875ed64669..19e9cd0ce13 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/DebugTextUtil.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/DebugTextUtil.kt @@ -237,9 +237,6 @@ private object DebugTextBuildingVisitor : JetVisitor() { return buildText { append("STUB: ") appendInn(declaration.getModifierList(), suffix = " ") - if (declaration.isDefault()) { - append("class ") - } append("object ") appendInn(declaration.getNameAsName()) appendInn(declaration.getDelegationSpecifierList(), prefix = " : ") @@ -273,9 +270,6 @@ private object DebugTextBuildingVisitor : JetVisitor() { override fun visitTypeConstraint(constraint: JetTypeConstraint, data: Unit?): String? { return buildText { - if (constraint.isDefaultObjectConstraint()) { - append("class object ") - } appendInn(constraint.getSubjectTypeParameterName()) appendInn(constraint.getBoundTypeReference(), prefix = " : ") } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverloadResolver.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverloadResolver.java index 5bea75b891e..45e43b6423f 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverloadResolver.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverloadResolver.java @@ -123,7 +123,7 @@ public class OverloadResolver { if (jetClass instanceof JetObjectDeclaration) { // must be default object name = classDescriptor.getContainingDeclaration().getName().asString(); - return "class object " + name; + return "default object " + name; } // safe return ""; diff --git a/compiler/testData/asJava/lightClassStructure/ClassObject.kt b/compiler/testData/asJava/lightClassStructure/ClassObject.kt index 5d4fb2787c8..ac10c17608e 100644 --- a/compiler/testData/asJava/lightClassStructure/ClassObject.kt +++ b/compiler/testData/asJava/lightClassStructure/ClassObject.kt @@ -1,6 +1,6 @@ package test class WithClassObject { - class object { + default object { } } \ No newline at end of file diff --git a/compiler/testData/asJava/lightClassStructure/PlatformStaticMethodsGenerics.kt b/compiler/testData/asJava/lightClassStructure/PlatformStaticMethodsGenerics.kt index 30901b547f4..2e138c8f31d 100644 --- a/compiler/testData/asJava/lightClassStructure/PlatformStaticMethodsGenerics.kt +++ b/compiler/testData/asJava/lightClassStructure/PlatformStaticMethodsGenerics.kt @@ -3,7 +3,7 @@ package test import kotlin.platform.platformStatic class PlatformStaticClass { - class object { + default object { platformStatic fun inClassObject() {} } diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt index 922761cc2ed..20f8c240fbc 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt @@ -1,7 +1,7 @@ // ClassObjectField class ClassObjectField { - class object { + default object { val x: String? = "" private val y: String? = "" } diff --git a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/TraitClassObjectField.kt b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/TraitClassObjectField.kt index 6d96e4ff205..e720f181b55 100644 --- a/compiler/testData/asJava/lightClasses/nullabilityAnnotations/TraitClassObjectField.kt +++ b/compiler/testData/asJava/lightClasses/nullabilityAnnotations/TraitClassObjectField.kt @@ -1,7 +1,7 @@ // TraitClassObjectField trait TraitClassObjectField { - class object { + default object { val x: String? = "" private val y: String? = "" } diff --git a/compiler/testData/builtin-classes.txt b/compiler/testData/builtin-classes.txt index cf2c7c52762..c91e8bd4920 100644 --- a/compiler/testData/builtin-classes.txt +++ b/compiler/testData/builtin-classes.txt @@ -109,7 +109,7 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public open override /*1*/ fun toLong(): kotlin.Long public open override /*1*/ fun toShort(): kotlin.Short - public class object Default { + public default object Default { /*primary*/ private constructor Default() } } @@ -171,7 +171,7 @@ public final class ByteRange : kotlin.Range, kotlin.Progression(): kotlin.ByteRange @@ -289,7 +289,7 @@ public final class CharRange : kotlin.Range, kotlin.Progression(): kotlin.CharRange @@ -380,7 +380,7 @@ public final class Double : kotlin.Number, kotlin.Comparable { public open override /*1*/ fun toLong(): kotlin.Long public open override /*1*/ fun toShort(): kotlin.Short - public class object Default : kotlin.FloatingPointConstants { + public default object Default : kotlin.FloatingPointConstants { /*primary*/ private constructor Default() public abstract override /*1*/ /*fake_override*/ val NEGATIVE_INFINITY: kotlin.Double public abstract override /*1*/ /*fake_override*/ fun (): kotlin.Double @@ -445,7 +445,7 @@ public final class DoubleRange : kotlin.Range, kotlin.Progression public open override /*1*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ fun iterator(): kotlin.DoubleIterator - public class object Default { + public default object Default { /*primary*/ private constructor Default() public final val EMPTY: kotlin.DoubleRange public final fun (): kotlin.DoubleRange @@ -458,7 +458,7 @@ public abstract class Enum> : kotlin.Comparable { public final fun name(): kotlin.String public final fun ordinal(): kotlin.Int - public class object Default { + public default object Default { /*primary*/ private constructor Default() } } @@ -618,7 +618,7 @@ public final class Float : kotlin.Number, kotlin.Comparable { public open override /*1*/ fun toLong(): kotlin.Long public open override /*1*/ fun toShort(): kotlin.Short - public class object Default : kotlin.FloatingPointConstants { + public default object Default : kotlin.FloatingPointConstants { /*primary*/ private constructor Default() public abstract override /*1*/ /*fake_override*/ val NEGATIVE_INFINITY: kotlin.Float public abstract override /*1*/ /*fake_override*/ fun (): kotlin.Float @@ -683,7 +683,7 @@ public final class FloatRange : kotlin.Range, kotlin.Progression(): kotlin.FloatRange @@ -911,7 +911,7 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final fun ushr(/*0*/ bits: kotlin.Int): kotlin.Int public final fun xor(/*0*/ other: kotlin.Int): kotlin.Int - public class object Default { + public default object Default { /*primary*/ private constructor Default() } } @@ -973,7 +973,7 @@ public final class IntRange : kotlin.Range, kotlin.Progression(): kotlin.IntRange @@ -1082,7 +1082,7 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final fun ushr(/*0*/ bits: kotlin.Int): kotlin.Long public final fun xor(/*0*/ other: kotlin.Long): kotlin.Long - public class object Default { + public default object Default { /*primary*/ private constructor Default() } } @@ -1144,7 +1144,7 @@ public final class LongRange : kotlin.Range, kotlin.Progression(): kotlin.LongRange @@ -1378,7 +1378,7 @@ public final class Short : kotlin.Number, kotlin.Comparable { public open override /*1*/ fun toLong(): kotlin.Long public open override /*1*/ fun toShort(): kotlin.Short - public class object Default { + public default object Default { /*primary*/ private constructor Default() } } @@ -1440,7 +1440,7 @@ public final class ShortRange : kotlin.Range, kotlin.Progression(): kotlin.ShortRange @@ -1456,7 +1456,7 @@ public final class String : kotlin.Comparable, kotlin.CharSequenc public final fun plus(/*0*/ other: kotlin.Any?): kotlin.String public open override /*1*/ fun subSequence(/*0*/ start: kotlin.Int, /*1*/ end: kotlin.Int): kotlin.CharSequence - public class object Default { + public default object Default { /*primary*/ private constructor Default() } } diff --git a/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions b/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions index 732cec5d147..9aec4bc9825 100644 --- a/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions +++ b/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions @@ -2,7 +2,7 @@ class C() { val a: Int = 1 - class object { + default object { val x : Int { diff --git a/compiler/testData/cfg/declarations/local/LocalDeclarations.kt b/compiler/testData/cfg/declarations/local/LocalDeclarations.kt index 600619c1b6f..c4940740684 100644 --- a/compiler/testData/cfg/declarations/local/LocalDeclarations.kt +++ b/compiler/testData/cfg/declarations/local/LocalDeclarations.kt @@ -1,7 +1,7 @@ class C() { val a: Int = 1 - class object { + default object { val x : Int { diff --git a/compiler/testData/cfg/declarations/local/LocalDeclarations.values b/compiler/testData/cfg/declarations/local/LocalDeclarations.values index db48c8297c5..14441d36413 100644 --- a/compiler/testData/cfg/declarations/local/LocalDeclarations.values +++ b/compiler/testData/cfg/declarations/local/LocalDeclarations.values @@ -2,7 +2,7 @@ class C() { val a: Int = 1 - class object { + default object { val x : Int { diff --git a/compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt b/compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt index e309d418a48..2b5b8c04bdc 100644 --- a/compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt +++ b/compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { var xi = 0 var xin : Int? = 0 var xinn : Int? = null diff --git a/compiler/testData/codegen/box/classes/classObject.kt b/compiler/testData/codegen/box/classes/classObject.kt index 76eff77c438..9d24ef7c256 100644 --- a/compiler/testData/codegen/box/classes/classObject.kt +++ b/compiler/testData/codegen/box/classes/classObject.kt @@ -1,5 +1,5 @@ class C() { - class object { + default object { fun create() = C() } } diff --git a/compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt b/compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt index 153e9e4a640..fa6250c6c5d 100644 --- a/compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt +++ b/compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt @@ -1,7 +1,7 @@ fun Any.foo() = 1 class A { - class object + default object } fun box() = if (A.foo() == 1) "OK" else "fail" diff --git a/compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt b/compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt index 205147ca786..0bbd5593beb 100644 --- a/compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt +++ b/compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt @@ -1,7 +1,7 @@ var global = 0; class C { - class object { + default object { { global = 1; } diff --git a/compiler/testData/codegen/box/classes/classObjectField.kt b/compiler/testData/codegen/box/classes/classObjectField.kt index 7f7bd89c6c1..06b7819b949 100644 --- a/compiler/testData/codegen/box/classes/classObjectField.kt +++ b/compiler/testData/codegen/box/classes/classObjectField.kt @@ -1,5 +1,5 @@ class A() { - class object { + default object { val value = 10 } } diff --git a/compiler/testData/codegen/box/classes/classObjectInTrait.kt b/compiler/testData/codegen/box/classes/classObjectInTrait.kt index f931cb5c4e8..b9df87f1a2c 100644 --- a/compiler/testData/codegen/box/classes/classObjectInTrait.kt +++ b/compiler/testData/codegen/box/classes/classObjectInTrait.kt @@ -1,7 +1,7 @@ // EA-38323 - Illegal field modifiers in class: classObject field in C must be static and final trait C { - class object { + default object { public val FOO: String = "OK" } } diff --git a/compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt b/compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt index 4cbb7a4e0a6..cb1bca3439d 100644 --- a/compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt +++ b/compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { fun values() = "O" fun valueOf() = "K" } diff --git a/compiler/testData/codegen/box/classes/classObjectToString.kt b/compiler/testData/codegen/box/classes/classObjectToString.kt index cc4f4db1ceb..55251983524 100644 --- a/compiler/testData/codegen/box/classes/classObjectToString.kt +++ b/compiler/testData/codegen/box/classes/classObjectToString.kt @@ -1,4 +1,4 @@ -class SomeClass { class object } +class SomeClass { default object } fun box() = if ((SomeClass.toString() as java.lang.String).matches("SomeClass\\\$Default@[0-9a-fA-F]+")) diff --git a/compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt b/compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt index 3e10c304bf0..bacea1f1133 100644 --- a/compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt +++ b/compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt @@ -1,5 +1,5 @@ class C() { - class object { + default object { private fun create() = C() } diff --git a/compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt b/compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt index c79a6babccf..dc16dec98fd 100644 --- a/compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt +++ b/compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt @@ -1,5 +1,5 @@ open class Test { - class object { + default object { fun testStatic(ic: InnerClass): NotInnerClass = NotInnerClass(ic.value) } diff --git a/compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt b/compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt index b7e4bf8cdd2..6bdea4b2fc6 100644 --- a/compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt +++ b/compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt @@ -1,5 +1,5 @@ class C() { - class object Foo + default object Foo } fun C.Foo.create() = 3 diff --git a/compiler/testData/codegen/box/classes/kt1018.kt b/compiler/testData/codegen/box/classes/kt1018.kt index 110c1778bc3..602062efff6 100644 --- a/compiler/testData/codegen/box/classes/kt1018.kt +++ b/compiler/testData/codegen/box/classes/kt1018.kt @@ -4,7 +4,7 @@ public class StockMarketTableModel() { return COLUMN_TITLES?.size()!! } - class object { + default object { private val COLUMN_TITLES : Array = arrayOfNulls(10) } } diff --git a/compiler/testData/codegen/box/classes/kt2384.kt b/compiler/testData/codegen/box/classes/kt2384.kt index 20900c9069f..545d5c2e166 100644 --- a/compiler/testData/codegen/box/classes/kt2384.kt +++ b/compiler/testData/codegen/box/classes/kt2384.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { val b = 0 val c = b diff --git a/compiler/testData/codegen/box/classes/kt249.kt b/compiler/testData/codegen/box/classes/kt249.kt index 2fe25f7baa3..fd5282fc6df 100644 --- a/compiler/testData/codegen/box/classes/kt249.kt +++ b/compiler/testData/codegen/box/classes/kt249.kt @@ -1,7 +1,7 @@ package x class Outer() { - class object { + default object { class Inner() { } } diff --git a/compiler/testData/codegen/box/classes/kt2784.kt b/compiler/testData/codegen/box/classes/kt2784.kt index 386194c8c1c..db5ee7eb0c4 100644 --- a/compiler/testData/codegen/box/classes/kt2784.kt +++ b/compiler/testData/codegen/box/classes/kt2784.kt @@ -1,7 +1,7 @@ open class Factory(p: Int) class A { - class object : Factory(1) + default object : Factory(1) } fun box() : String { diff --git a/compiler/testData/codegen/box/classes/kt508.kt b/compiler/testData/codegen/box/classes/kt508.kt index 134aa72670b..d6517f532a9 100644 --- a/compiler/testData/codegen/box/classes/kt508.kt +++ b/compiler/testData/codegen/box/classes/kt508.kt @@ -2,7 +2,7 @@ package mult_constructors_3_bug public open class Identifier() { private var myNullable : Boolean = true - class object { + default object { open public fun init(isNullable : Boolean) : Identifier { val __ = Identifier() __.myNullable = isNullable diff --git a/compiler/testData/codegen/box/classes/namedClassObject.kt b/compiler/testData/codegen/box/classes/namedClassObject.kt index 8272e4dd0a4..cf660ac7aac 100644 --- a/compiler/testData/codegen/box/classes/namedClassObject.kt +++ b/compiler/testData/codegen/box/classes/namedClassObject.kt @@ -1,5 +1,5 @@ class C() { - class object Foo { + default object Foo { fun create() = 3 } } diff --git a/compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt b/compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt index c5535da8aae..ae335592654 100644 --- a/compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt +++ b/compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt @@ -1,5 +1,5 @@ class Foo private(val param: String = "OK") { - class object { + default object { val s = Foo() } } diff --git a/compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt b/compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt index 1ca02504b97..99367454ea7 100644 --- a/compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt +++ b/compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { fun Int.foo(a: Int = 1): Int { return a } diff --git a/compiler/testData/codegen/box/delegatedProperty/kt4138.kt b/compiler/testData/codegen/box/delegatedProperty/kt4138.kt index b3af82a8213..29026c5f0e9 100644 --- a/compiler/testData/codegen/box/delegatedProperty/kt4138.kt +++ b/compiler/testData/codegen/box/delegatedProperty/kt4138.kt @@ -5,14 +5,14 @@ class Delegate(var inner: T) { class Foo (val f: Int) { - class object { + default object { val A: Foo by Delegate(Foo(11)) var B: Foo by Delegate(Foo(11)) } } trait FooTrait { - class object { + default object { val A: Foo by Delegate(Foo(11)) var B: Foo by Delegate(Foo(11)) } diff --git a/compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt b/compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt index c00bf16c9ff..8435fa0e066 100644 --- a/compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt +++ b/compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt @@ -3,7 +3,7 @@ import java.util.IdentityHashMap class A { var foo: Int by IntHandler - class object { + default object { var bar: Any? by AnyHandler } } diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt index 3da9bcd33b1..cadddbe73c9 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { fun invoke(i: Int) = i } } diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.txt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.txt index 690da2d8a9a..265a9bf36cd 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.txt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.txt @@ -8,7 +8,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt index f31a9a39694..fb74564a48d 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt @@ -3,7 +3,7 @@ trait B fun B.invoke(i: Int) = i class A { - class object: B { + default object: B { } } diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.txt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.txt index e9dd1db0638..543021380ff 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.txt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.txt @@ -9,7 +9,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : B { + internal default object Default : B { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt index 6af55e75ca2..bb8be09c4e5 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt @@ -1,6 +1,6 @@ class A { class Nested { - class object { + default object { fun invoke(i: Int) = i } } diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.txt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.txt index 81bdd376c39..dac62217eb2 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.txt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.txt @@ -14,7 +14,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt index 45116480301..86dee8aa2af 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt @@ -2,7 +2,7 @@ import A.Nested class A { class Nested { - class object { + default object { fun invoke(i: Int) = i } } diff --git a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.txt b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.txt index 81bdd376c39..dac62217eb2 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.txt +++ b/compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.txt @@ -14,7 +14,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/codegen/box/enum/classObjectInEnum.kt b/compiler/testData/codegen/box/enum/classObjectInEnum.kt index f4562e9e1d0..47521761566 100644 --- a/compiler/testData/codegen/box/enum/classObjectInEnum.kt +++ b/compiler/testData/codegen/box/enum/classObjectInEnum.kt @@ -3,7 +3,7 @@ enum class Game { PAPER SCISSORS - class object { + default object { fun foo() = ROCK val bar = PAPER } diff --git a/compiler/testData/codegen/box/enum/inclassobj.kt b/compiler/testData/codegen/box/enum/inclassobj.kt index e0e07f89a1d..1c0d612273b 100644 --- a/compiler/testData/codegen/box/enum/inclassobj.kt +++ b/compiler/testData/codegen/box/enum/inclassobj.kt @@ -2,7 +2,7 @@ fun box() = if(Context.operatingSystemType == Context.Default.OsType.OTHER) "OK" public class Context { - class object + default object { public enum class OsType { LINUX; diff --git a/compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt b/compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt index 74244024e98..b7242eeaef8 100644 --- a/compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt +++ b/compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt @@ -1,5 +1,5 @@ class A { - class object {} + default object {} enum class E { OK } diff --git a/compiler/testData/codegen/box/extensionFunctions/kt4228.kt b/compiler/testData/codegen/box/extensionFunctions/kt4228.kt index 99a620dc0f9..98ff1d63918 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt4228.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt4228.kt @@ -1,5 +1,5 @@ class A { - class object + default object } val foo: Any.() -> Unit = {} diff --git a/compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt b/compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt index 51997792442..68da5e80fc1 100644 --- a/compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt +++ b/compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt @@ -1,6 +1,6 @@ class Test(val prop: String) { - class object { + default object { public val prop : String = "CO"; } diff --git a/compiler/testData/codegen/box/functions/kt2716.kt b/compiler/testData/codegen/box/functions/kt2716.kt index cb89f62430e..4900ab6017b 100644 --- a/compiler/testData/codegen/box/functions/kt2716.kt +++ b/compiler/testData/codegen/box/functions/kt2716.kt @@ -1,7 +1,7 @@ package someTest public class Some private(val v: String) { - class object { + default object { public fun init(v: String): Some { return Some(v) } diff --git a/compiler/testData/codegen/box/innerNested/nestedClassObject.kt b/compiler/testData/codegen/box/innerNested/nestedClassObject.kt index ccdde084e49..ee7907bbd7d 100644 --- a/compiler/testData/codegen/box/innerNested/nestedClassObject.kt +++ b/compiler/testData/codegen/box/innerNested/nestedClassObject.kt @@ -1,6 +1,6 @@ class Outer { class Nested { - class object { + default object { val O = "O" val K = "K" } diff --git a/compiler/testData/codegen/box/objects/flist.kt b/compiler/testData/codegen/box/objects/flist.kt index e7dd47d25d0..3499c26bba7 100644 --- a/compiler/testData/codegen/box/objects/flist.kt +++ b/compiler/testData/codegen/box/objects/flist.kt @@ -3,7 +3,7 @@ public abstract class FList() { public abstract val tail: FList public abstract val empty: Boolean - class object { + default object { val emptyFList = object: FList() { public override val head: Any get() = throw UnsupportedOperationException(); diff --git a/compiler/testData/codegen/box/objects/kt1047.kt b/compiler/testData/codegen/box/objects/kt1047.kt index 2698637902c..ffa0cb2950a 100644 --- a/compiler/testData/codegen/box/objects/kt1047.kt +++ b/compiler/testData/codegen/box/objects/kt1047.kt @@ -2,7 +2,7 @@ public open class Test() { open public fun test() : Unit { System.out?.println(hello) } - class object { + default object { private val hello : String? = "Hello" } } diff --git a/compiler/testData/codegen/box/objects/kt2719.kt b/compiler/testData/codegen/box/objects/kt2719.kt index 8a981bc099c..3eb8d1e4573 100644 --- a/compiler/testData/codegen/box/objects/kt2719.kt +++ b/compiler/testData/codegen/box/objects/kt2719.kt @@ -1,5 +1,5 @@ class Clazz { - class object { + default object { val a = object { fun run(x: String) = x } diff --git a/compiler/testData/codegen/box/objects/kt535.kt b/compiler/testData/codegen/box/objects/kt535.kt index ee2d078ee06..eed70c894a3 100644 --- a/compiler/testData/codegen/box/objects/kt535.kt +++ b/compiler/testData/codegen/box/objects/kt535.kt @@ -3,7 +3,7 @@ class Identifier(t : T?, myHasDollar : Boolean) { public fun getName() : T? { return myT } - class object { + default object { open public fun init(name : T?) : Identifier { val __ = Identifier(name, false) return __ diff --git a/compiler/testData/codegen/box/objects/kt560.kt b/compiler/testData/codegen/box/objects/kt560.kt index bddfb6d8514..1fe2b9d6477 100644 --- a/compiler/testData/codegen/box/objects/kt560.kt +++ b/compiler/testData/codegen/box/objects/kt560.kt @@ -4,7 +4,7 @@ import java.io.* open class AllEvenNum() { - class object { + default object { open public fun main(args : Array?) : Unit { var i : Int = 1 while ((i <= 100)) { diff --git a/compiler/testData/codegen/box/objects/kt640.kt b/compiler/testData/codegen/box/objects/kt640.kt index 493c8e8ff23..9e61927242c 100644 --- a/compiler/testData/codegen/box/objects/kt640.kt +++ b/compiler/testData/codegen/box/objects/kt640.kt @@ -14,7 +14,7 @@ public open class Identifier(myName : T?, myHasDollar : Boolean) { return myName } - class object { + default object { open public fun init(name : T?) : Identifier { val __ = Identifier(name, false) return __ diff --git a/compiler/testData/codegen/box/properties/classObjectProperties.kt b/compiler/testData/codegen/box/properties/classObjectProperties.kt index 17afac79eb2..10d88854908 100644 --- a/compiler/testData/codegen/box/properties/classObjectProperties.kt +++ b/compiler/testData/codegen/box/properties/classObjectProperties.kt @@ -1,6 +1,6 @@ class Test { - class object { + default object { public val prop1 : Int = 10 diff --git a/compiler/testData/codegen/box/properties/kt1482_2279.kt b/compiler/testData/codegen/box/properties/kt1482_2279.kt index df07629e40c..1221224bb79 100644 --- a/compiler/testData/codegen/box/properties/kt1482_2279.kt +++ b/compiler/testData/codegen/box/properties/kt1482_2279.kt @@ -1,7 +1,7 @@ abstract class ClassValAbstract { abstract var a: Int - class object { + default object { val methods = (this as java.lang.Object).getClass()?.getClassLoader()?.loadClass("ClassValAbstract")?.getMethods()!! } } diff --git a/compiler/testData/codegen/box/properties/kt3551.kt b/compiler/testData/codegen/box/properties/kt3551.kt index d0873ebd93c..eda42cb8186 100644 --- a/compiler/testData/codegen/box/properties/kt3551.kt +++ b/compiler/testData/codegen/box/properties/kt3551.kt @@ -8,7 +8,7 @@ class Identifier() { return myNullable } - class object { + default object { fun init(isNullable : Boolean) : Identifier { val id = Identifier() id.myNullable = isNullable diff --git a/compiler/testData/codegen/box/properties/kt4140.kt b/compiler/testData/codegen/box/properties/kt4140.kt index a7cc2e88e8d..7b35305d299 100644 --- a/compiler/testData/codegen/box/properties/kt4140.kt +++ b/compiler/testData/codegen/box/properties/kt4140.kt @@ -1,6 +1,6 @@ class TestObject() { - class object { + default object { var prop: Int = 1 get() = $prop++ } diff --git a/compiler/testData/codegen/box/properties/kt4252.kt b/compiler/testData/codegen/box/properties/kt4252.kt index 9a8fb30b49c..d90163bd232 100644 --- a/compiler/testData/codegen/box/properties/kt4252.kt +++ b/compiler/testData/codegen/box/properties/kt4252.kt @@ -2,7 +2,7 @@ class CallbackBlock {} public class Foo { - class object { + default object { private var bar = 0 } diff --git a/compiler/testData/codegen/box/properties/kt4252_2.kt b/compiler/testData/codegen/box/properties/kt4252_2.kt index a608b7c559c..89d24a9a367 100644 --- a/compiler/testData/codegen/box/properties/kt4252_2.kt +++ b/compiler/testData/codegen/box/properties/kt4252_2.kt @@ -1,5 +1,5 @@ class Foo() { - class object { + default object { val bar = "OK"; var boo = "FAIL"; } diff --git a/compiler/testData/codegen/box/staticFields/anonymousInitializerInClassObject.kt b/compiler/testData/codegen/box/staticFields/anonymousInitializerInClassObject.kt index 39951a9e226..a9d1cb7cd00 100644 --- a/compiler/testData/codegen/box/staticFields/anonymousInitializerInClassObject.kt +++ b/compiler/testData/codegen/box/staticFields/anonymousInitializerInClassObject.kt @@ -1,5 +1,5 @@ class Foo { - class object { + default object { val bar: String { diff --git a/compiler/testData/codegen/box/staticFields/incInClassObject.kt b/compiler/testData/codegen/box/staticFields/incInClassObject.kt index d902bfaf50a..8a8481a56c5 100644 --- a/compiler/testData/codegen/box/staticFields/incInClassObject.kt +++ b/compiler/testData/codegen/box/staticFields/incInClassObject.kt @@ -1,6 +1,6 @@ class A { - class object { + default object { private var r: Int = 1; fun test(): Int { diff --git a/compiler/testData/codegen/box/staticFields/inheritedPropertyInClassObject.kt b/compiler/testData/codegen/box/staticFields/inheritedPropertyInClassObject.kt index 42a9b180160..b015febd970 100644 --- a/compiler/testData/codegen/box/staticFields/inheritedPropertyInClassObject.kt +++ b/compiler/testData/codegen/box/staticFields/inheritedPropertyInClassObject.kt @@ -1,6 +1,6 @@ open class Bar(val prop: String) class Foo { - class object : Bar("OK") { + default object : Bar("OK") { val p = Foo.prop val p2 = prop val p3 = this.prop diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt b/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt index cad83d0b62e..3d392c75608 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt +++ b/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt @@ -1,5 +1,5 @@ class A { - class object: funClassObject() { + default object: funClassObject() { fun test(): String { return funClassObject.protectedFun()!! } diff --git a/compiler/testData/codegen/boxInline/simple/classObject.2.kt b/compiler/testData/codegen/boxInline/simple/classObject.2.kt index 2cf3aa60984..e2c941bc521 100644 --- a/compiler/testData/codegen/boxInline/simple/classObject.2.kt +++ b/compiler/testData/codegen/boxInline/simple/classObject.2.kt @@ -10,7 +10,7 @@ class InlineAll { return s() } - class object { + default object { inline fun inline(s: () -> String): String { return s() } diff --git a/compiler/testData/codegen/boxInline/trait/trait.2.kt b/compiler/testData/codegen/boxInline/trait/trait.2.kt index 56c55a4f6f5..b5219e7c7ca 100644 --- a/compiler/testData/codegen/boxInline/trait/trait.2.kt +++ b/compiler/testData/codegen/boxInline/trait/trait.2.kt @@ -6,7 +6,7 @@ trait InlineTrait { return s() } - class object { + default object { inline final fun finalInline(s: () -> String): String { return s() } diff --git a/compiler/testData/codegen/boxWithJava/classObjectAccessor/classObject.kt b/compiler/testData/codegen/boxWithJava/classObjectAccessor/classObject.kt index b9652fab9da..7b3b1e9aa93 100644 --- a/compiler/testData/codegen/boxWithJava/classObjectAccessor/classObject.kt +++ b/compiler/testData/codegen/boxWithJava/classObjectAccessor/classObject.kt @@ -1,12 +1,12 @@ class A { - class object { + default object { val i1 = 1 val i2 = 2 } } class B { - class object Named { + default object Named { val i1 = 3 val i2 = 4 } diff --git a/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt b/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt index 057922da3eb..ea68d8e4894 100644 --- a/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt +++ b/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt @@ -7,7 +7,7 @@ annotation class testAnnotation class A { - class object { + default object { val b: String = "OK" platformStatic testAnnotation fun test1() = b diff --git a/compiler/testData/codegen/boxWithJava/platformStatic/classObject/simpleClassObject.kt b/compiler/testData/codegen/boxWithJava/platformStatic/classObject/simpleClassObject.kt index 052b521ea92..5445a3c9e89 100644 --- a/compiler/testData/codegen/boxWithJava/platformStatic/classObject/simpleClassObject.kt +++ b/compiler/testData/codegen/boxWithJava/platformStatic/classObject/simpleClassObject.kt @@ -2,7 +2,7 @@ import kotlin.platform.platformStatic class A { - class object { + default object { val b: String = "OK" platformStatic val c: String = "OK" diff --git a/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/classObjectProperties.kt b/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/classObjectProperties.kt index 47f71d02212..e77f9342e4c 100644 --- a/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/classObjectProperties.kt +++ b/compiler/testData/codegen/boxWithJava/properties/classObjectProperties/classObjectProperties.kt @@ -1,17 +1,17 @@ class Klass { - class object { + default object { val NAME = "Klass" } } trait Trait { - class object { + default object { val NAME = "Trait" } } enum class Enoom { - class object { + default object { val NAME = "Enoom" } } diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/kotlinPropertyFromClassObjectAsParameter.kt b/compiler/testData/codegen/boxWithStdlib/annotations/kotlinPropertyFromClassObjectAsParameter.kt index 8668a33b046..2c569ba8ab3 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/kotlinPropertyFromClassObjectAsParameter.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/kotlinPropertyFromClassObjectAsParameter.kt @@ -32,7 +32,7 @@ annotation class Ann( ) class Foo { - class object { + default object { val i: Int = 2 val s: Short = 2 val f: Float = 2.0.toFloat() diff --git a/compiler/testData/codegen/boxWithStdlib/annotations/nestedClassPropertyAsParameter.kt b/compiler/testData/codegen/boxWithStdlib/annotations/nestedClassPropertyAsParameter.kt index d58b8d32670..6b2c2c3f756 100644 --- a/compiler/testData/codegen/boxWithStdlib/annotations/nestedClassPropertyAsParameter.kt +++ b/compiler/testData/codegen/boxWithStdlib/annotations/nestedClassPropertyAsParameter.kt @@ -15,7 +15,7 @@ annotation class Ann(val i: Int) class A { class B { - class object { + default object { val i = 1 } } diff --git a/compiler/testData/codegen/boxWithStdlib/callableReference/property/kClassInstanceIsInitializedFirst.kt b/compiler/testData/codegen/boxWithStdlib/callableReference/property/kClassInstanceIsInitializedFirst.kt index d83348c141c..fdec8486202 100644 --- a/compiler/testData/codegen/boxWithStdlib/callableReference/property/kClassInstanceIsInitializedFirst.kt +++ b/compiler/testData/codegen/boxWithStdlib/callableReference/property/kClassInstanceIsInitializedFirst.kt @@ -1,7 +1,7 @@ import kotlin.reflect.KMemberProperty class A { - class object { + default object { val ref: KMemberProperty = A::foo } diff --git a/compiler/testData/codegen/boxWithStdlib/native/nativePropertyAccessors.kt b/compiler/testData/codegen/boxWithStdlib/native/nativePropertyAccessors.kt index f13b4e3fea2..1d2836285a8 100644 --- a/compiler/testData/codegen/boxWithStdlib/native/nativePropertyAccessors.kt +++ b/compiler/testData/codegen/boxWithStdlib/native/nativePropertyAccessors.kt @@ -1,5 +1,5 @@ class C { - class object { + default object { val defaultGetter: Int = 1 [native] get diff --git a/compiler/testData/codegen/boxWithStdlib/native/privateStatic.kt b/compiler/testData/codegen/boxWithStdlib/native/privateStatic.kt index 8ec5f1b8c1c..7be128bf10a 100644 --- a/compiler/testData/codegen/boxWithStdlib/native/privateStatic.kt +++ b/compiler/testData/codegen/boxWithStdlib/native/privateStatic.kt @@ -2,7 +2,7 @@ import kotlin.jvm.* import kotlin.platform.* class C { - class object { + default object { private platformStatic native fun foo() } diff --git a/compiler/testData/codegen/boxWithStdlib/native/staticNative.kt b/compiler/testData/codegen/boxWithStdlib/native/staticNative.kt index 4f9ca83e2f3..ee31da43788 100644 --- a/compiler/testData/codegen/boxWithStdlib/native/staticNative.kt +++ b/compiler/testData/codegen/boxWithStdlib/native/staticNative.kt @@ -4,7 +4,7 @@ import kotlin.jvm.* import kotlin.platform.* class WithNative { - class object { + default object { platformStatic native fun bar(l: Long, s: String): Double } } diff --git a/compiler/testData/codegen/boxWithStdlib/platformStatic/syntheticAccessor.kt b/compiler/testData/codegen/boxWithStdlib/platformStatic/syntheticAccessor.kt index b2c6154771b..f56724fb1e6 100644 --- a/compiler/testData/codegen/boxWithStdlib/platformStatic/syntheticAccessor.kt +++ b/compiler/testData/codegen/boxWithStdlib/platformStatic/syntheticAccessor.kt @@ -1,7 +1,7 @@ import kotlin.platform.* class C { - class object { + default object { private platformStatic fun foo(): String { return "OK" } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInClassObject.kt b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInClassObject.kt index 91d368ae3e1..5b9d8181177 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInClassObject.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/enclosing/lambdaInClassObject.kt @@ -1,5 +1,5 @@ class O { - class object { + default object { // Currently we consider in class O as the enclosing method of this lambda, // so we write outer class = O and enclosing method = null val f = {} diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt5112.kt b/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt5112.kt index bd6317ca88b..bc293db61b6 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt5112.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt5112.kt @@ -5,13 +5,13 @@ class G(val s: T) { } public trait ErrorsJvmTrait { - class object { + default object { public val param : G = G("STRING") } } public class ErrorsJvmClass { - class object { + default object { public val param : G = G("STRING") } } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt6106.kt b/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt6106.kt index a128820ae8d..143d250560c 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt6106.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt6106.kt @@ -6,7 +6,7 @@ open class B class A { - class object { + default object { [platformStatic] fun a(s: T) : T { return s diff --git a/compiler/testData/codegen/boxWithStdlib/whenEnumOptimization/enumInsideClassObject.kt b/compiler/testData/codegen/boxWithStdlib/whenEnumOptimization/enumInsideClassObject.kt index 90d0edb4ab9..440cf9f0aab 100644 --- a/compiler/testData/codegen/boxWithStdlib/whenEnumOptimization/enumInsideClassObject.kt +++ b/compiler/testData/codegen/boxWithStdlib/whenEnumOptimization/enumInsideClassObject.kt @@ -1,7 +1,7 @@ import kotlin.test.assertEquals class A { - class object { + default object { enum class Season { WINTER SPRING diff --git a/compiler/testData/codegen/bytecodeText/staticFields/classObject.kt b/compiler/testData/codegen/bytecodeText/staticFields/classObject.kt index 1dc1823c1e3..2486b8e659c 100644 --- a/compiler/testData/codegen/bytecodeText/staticFields/classObject.kt +++ b/compiler/testData/codegen/bytecodeText/staticFields/classObject.kt @@ -1,7 +1,7 @@ class A { - class object { + default object { val r: Int = 1; } } -// A and class object constructor call +// A and default object constructor call // 2 ALOAD 0 \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/staticFields/classObjectSyntheticAccessor.kt b/compiler/testData/codegen/bytecodeText/staticFields/classObjectSyntheticAccessor.kt index 34c92450825..1169178d381 100644 --- a/compiler/testData/codegen/bytecodeText/staticFields/classObjectSyntheticAccessor.kt +++ b/compiler/testData/codegen/bytecodeText/staticFields/classObjectSyntheticAccessor.kt @@ -1,8 +1,8 @@ class A { - class object { + default object { private var r: Int = 1; } } -// A and class object constructor call +// A and default object constructor call // 2 ALOAD 0 // 1 synthetic access\$getR diff --git a/compiler/testData/codegen/classes/classObjectInterface.kt b/compiler/testData/codegen/classes/classObjectInterface.kt index 432bb37bee0..dcd660fda83 100644 --- a/compiler/testData/codegen/classes/classObjectInterface.kt +++ b/compiler/testData/codegen/classes/classObjectInterface.kt @@ -1,7 +1,7 @@ class C() { fun getInstance(): Runnable = C - class object: Runnable { + default object: Runnable { override fun run(): Unit { } } } diff --git a/compiler/testData/codegen/classes/classObjectIsInnerClass.kt b/compiler/testData/codegen/classes/classObjectIsInnerClass.kt index 9c588bd344c..6638d9feeae 100644 --- a/compiler/testData/codegen/classes/classObjectIsInnerClass.kt +++ b/compiler/testData/codegen/classes/classObjectIsInnerClass.kt @@ -1,3 +1,3 @@ class A { - class object + default object } diff --git a/compiler/testData/codegen/defaultArguments/reflection/classInClassObject.kt b/compiler/testData/codegen/defaultArguments/reflection/classInClassObject.kt index 99cdd59209c..9e3a95f0699 100644 --- a/compiler/testData/codegen/defaultArguments/reflection/classInClassObject.kt +++ b/compiler/testData/codegen/defaultArguments/reflection/classInClassObject.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { class Foo(val a: Int = 1) {} } } diff --git a/compiler/testData/codegen/innerClassInfo/innerClassInfo.kt b/compiler/testData/codegen/innerClassInfo/innerClassInfo.kt index 9bd84699c5e..990a2e249a9 100644 --- a/compiler/testData/codegen/innerClassInfo/innerClassInfo.kt +++ b/compiler/testData/codegen/innerClassInfo/innerClassInfo.kt @@ -3,5 +3,5 @@ class A { inner class C } - class object + default object } diff --git a/compiler/testData/codegen/notNullAssertions/noAssertionsForKotlin.kt b/compiler/testData/codegen/notNullAssertions/noAssertionsForKotlin.kt index 06d0afcf744..2788a23ecbe 100644 --- a/compiler/testData/codegen/notNullAssertions/noAssertionsForKotlin.kt +++ b/compiler/testData/codegen/notNullAssertions/noAssertionsForKotlin.kt @@ -3,7 +3,7 @@ class A { fun foo(): String = "" - class object { + default object { val y: Any? = 239 fun bar(): String = "" diff --git a/compiler/testData/codegen/outerClassInfo/outerClassInfo.kt b/compiler/testData/codegen/outerClassInfo/outerClassInfo.kt index fe701258f50..d7d9a6124d9 100644 --- a/compiler/testData/codegen/outerClassInfo/outerClassInfo.kt +++ b/compiler/testData/codegen/outerClassInfo/outerClassInfo.kt @@ -2,7 +2,7 @@ package foo class Foo { - class object { + default object { fun objectFoo() { } } diff --git a/compiler/testData/codegen/properties/privateClassPropertyAccessors.kt b/compiler/testData/codegen/properties/privateClassPropertyAccessors.kt index 147f144f847..80cb1c0bc10 100644 --- a/compiler/testData/codegen/properties/privateClassPropertyAccessors.kt +++ b/compiler/testData/codegen/properties/privateClassPropertyAccessors.kt @@ -13,7 +13,7 @@ class C { get() = this set(value) {} - class object { + default object { private val classObjectVal: Long get() = 1L } diff --git a/compiler/testData/compileJavaAgainstKotlin/class/ClassObject.kt b/compiler/testData/compileJavaAgainstKotlin/class/ClassObject.kt index 3bf004730ba..1b07fc6edcd 100644 --- a/compiler/testData/compileJavaAgainstKotlin/class/ClassObject.kt +++ b/compiler/testData/compileJavaAgainstKotlin/class/ClassObject.kt @@ -1,7 +1,7 @@ package test class WithClassObject { - class object { + default object { fun foo() {} val value: Int = 0 diff --git a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObject.kt b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObject.kt index ba3c4845cde..9924e3e3678 100644 --- a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObject.kt +++ b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObject.kt @@ -4,7 +4,7 @@ import kotlin.platform.platformStatic class A { - class object { + default object { val b: String = "OK" platformStatic fun test1() { diff --git a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObjectProperty.kt b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObjectProperty.kt index b37c084bb94..3a59218af95 100644 --- a/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObjectProperty.kt +++ b/compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObjectProperty.kt @@ -3,7 +3,7 @@ package test import kotlin.platform.platformStatic class A { - class object { + default object { [platformStatic] val b: String = "OK" var A.c: String diff --git a/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.kt b/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.kt index b46ce6d0b98..98635e90872 100644 --- a/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.kt +++ b/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.kt @@ -10,7 +10,7 @@ annotation class AFloat(val value: Float) class Test { - class object { + default object { val vstring: String = "Test" val vchar: Char = 'c' val vint: Int = 10 diff --git a/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt b/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt index 69038739625..99ae40be29f 100644 --- a/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt +++ b/compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt @@ -10,7 +10,7 @@ annotation class AFloat(val value: Float) trait Test { - class object { + default object { val vstring: String = "Test" val vchar: Char = 'c' val vint: Int = 10 diff --git a/compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.kt b/compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.kt index 498f1cc70c9..ce470daf5c7 100644 --- a/compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.kt +++ b/compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.kt @@ -1,7 +1,7 @@ package test class KotlinClass { - class object { + default object { val FOO: Int = 10 } } diff --git a/compiler/testData/compileJavaAgainstKotlin/staticFields/staticClassProperty.kt b/compiler/testData/compileJavaAgainstKotlin/staticFields/staticClassProperty.kt index 7dc0ed8b136..17600d44ccc 100644 --- a/compiler/testData/compileJavaAgainstKotlin/staticFields/staticClassProperty.kt +++ b/compiler/testData/compileJavaAgainstKotlin/staticFields/staticClassProperty.kt @@ -2,7 +2,7 @@ package test class Test { - class object { + default object { public val valProp: Int = 10 public var varProp: Int = 10 diff --git a/compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt b/compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt index 3435d008743..312fb432f24 100644 --- a/compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt +++ b/compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt @@ -2,7 +2,7 @@ package test trait Test { - class object { + default object { public val valProp: Int = 10 } diff --git a/compiler/testData/compileKotlinAgainstKotlin/ClassObjectInEnum.A.kt b/compiler/testData/compileKotlinAgainstKotlin/ClassObjectInEnum.A.kt index 1672e5c3267..0ee67fb0f46 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/ClassObjectInEnum.A.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/ClassObjectInEnum.A.kt @@ -3,7 +3,7 @@ package library public enum class EnumClass { ENTRY - public class object { + public default object { public fun entry(): EnumClass = ENTRY } } diff --git a/compiler/testData/compileKotlinAgainstKotlin/ClassObjectMember.A.kt b/compiler/testData/compileKotlinAgainstKotlin/ClassObjectMember.A.kt index faeeaca6e30..db9b321e084 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/ClassObjectMember.A.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/ClassObjectMember.A.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { fun foo() = 42 val bar = "OK" } diff --git a/compiler/testData/diagnostics/tests/MultipleBounds.kt b/compiler/testData/diagnostics/tests/MultipleBounds.kt index 764c78655ed..7e9e1937f22 100644 --- a/compiler/testData/diagnostics/tests/MultipleBounds.kt +++ b/compiler/testData/diagnostics/tests/MultipleBounds.kt @@ -17,7 +17,7 @@ trait G { class C() : A(), B class D() { - class object : A(), B {} + default object : A(), B {} } class Test1() diff --git a/compiler/testData/diagnostics/tests/MultipleBounds.txt b/compiler/testData/diagnostics/tests/MultipleBounds.txt index b84ddb95f13..6833d725e17 100644 --- a/compiler/testData/diagnostics/tests/MultipleBounds.txt +++ b/compiler/testData/diagnostics/tests/MultipleBounds.txt @@ -52,7 +52,7 @@ package Jet87 { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : Jet87.A, Jet87.B { + internal default object Default : Jet87.A, Jet87.B { private constructor Default() internal open override /*1*/ /*fake_override*/ fun bar(): kotlin.Double public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt b/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt index 5327b8ef680..10e1f0fdc79 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt +++ b/compiler/testData/diagnostics/tests/annotations/annotationModifier.kt @@ -1,7 +1,7 @@ annotation class B class A { - annotation class object {} + annotation default object {} } annotation object O {} diff --git a/compiler/testData/diagnostics/tests/annotations/annotationModifier.txt b/compiler/testData/diagnostics/tests/annotations/annotationModifier.txt index 7618042fb3e..c522f88ea61 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationModifier.txt +++ b/compiler/testData/diagnostics/tests/annotations/annotationModifier.txt @@ -10,7 +10,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.kt b/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.kt index 9e4df8a205b..26654ab8a7a 100644 --- a/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.kt +++ b/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.kt @@ -11,7 +11,7 @@ annotation class Annotation4() { } annotation class Annotation5() { - class object {} + default object {} } annotation class Annotation6() { diff --git a/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.txt b/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.txt index 3bb9065d48e..29d787298a4 100644 --- a/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.txt +++ b/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.txt @@ -50,7 +50,7 @@ internal final annotation class Annotation5 : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/cast/WhenWithExpression.kt b/compiler/testData/diagnostics/tests/cast/WhenWithExpression.kt index 55d8b40bed7..9511a9a1818 100644 --- a/compiler/testData/diagnostics/tests/cast/WhenWithExpression.kt +++ b/compiler/testData/diagnostics/tests/cast/WhenWithExpression.kt @@ -1,5 +1,5 @@ class List(val size : Int) { - class object { + default object { val Nil = List(0) } } diff --git a/compiler/testData/diagnostics/tests/cast/WhenWithExpression.txt b/compiler/testData/diagnostics/tests/cast/WhenWithExpression.txt index 72bb7482e3c..bb3de2c406b 100644 --- a/compiler/testData/diagnostics/tests/cast/WhenWithExpression.txt +++ b/compiler/testData/diagnostics/tests/cast/WhenWithExpression.txt @@ -9,7 +9,7 @@ internal final class List { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val Nil: List public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.kt b/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.kt index 49f50bbd546..dbdcb31376c 100644 --- a/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.kt +++ b/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.kt @@ -3,7 +3,7 @@ class A() { val x = 1 - class object { + default object { val y = x } } diff --git a/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.txt b/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.txt index 4f7c564e34f..df08a60fd31 100644 --- a/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.txt +++ b/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.txt @@ -7,7 +7,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val y: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.kt b/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.kt index ae07aca5900..db447e235cd 100644 --- a/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.kt +++ b/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.kt @@ -9,7 +9,7 @@ fun test() { } class A() { - public class object { + public default object { val d = 3 private object f { @@ -19,12 +19,12 @@ class A() { class B { class D { - private class object + private default object } } class CCC() { - private class object { + private default object { val classObjectVar = 3 } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.txt b/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.txt index d7d2dbf38dd..efa641d6ce1 100644 --- a/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.txt +++ b/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.txt @@ -9,7 +9,7 @@ package foo { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public class object Default { + public default object Default { private constructor Default() internal final val d: kotlin.Int = 3 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -37,7 +37,7 @@ package foo { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - private class object Default { + private default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -52,7 +52,7 @@ package foo { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - private class object Default { + private default object Default { private constructor Default() internal final val classObjectVar: kotlin.Int = 3 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt b/compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt index 9d609c1a1aa..f22b74f6d02 100644 --- a/compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt +++ b/compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt @@ -1,22 +1,22 @@ package Jet86 class A { - class object { + default object { val x = 1 } - class object { + default object { val x = 1 } } class AA { - class object { + default object { val x = 1 } - class object A { + default object A { val x = 1 } - class object AA { + default object AA { val x = 1 } } @@ -26,7 +26,7 @@ class B() { } object b { - class object { + default object { val x = 1 } // error } diff --git a/compiler/testData/diagnostics/tests/classObjects/ClassObjects.txt b/compiler/testData/diagnostics/tests/classObjects/ClassObjects.txt index 26362f14acc..9bfbe8cf52f 100644 --- a/compiler/testData/diagnostics/tests/classObjects/ClassObjects.txt +++ b/compiler/testData/diagnostics/tests/classObjects/ClassObjects.txt @@ -13,7 +13,7 @@ package Jet86 { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val x: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -21,7 +21,7 @@ package Jet86 { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() internal final val x: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -36,7 +36,7 @@ package Jet86 { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object A { + internal default object A { private constructor A() internal final val x: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -44,7 +44,7 @@ package Jet86 { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object AA { + internal default object AA { private constructor AA() internal final val x: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -52,7 +52,7 @@ package Jet86 { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() internal final val x: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -75,7 +75,7 @@ package Jet86 { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val x: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt b/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt index cc14658334f..1250c66cfe1 100644 --- a/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt +++ b/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt @@ -5,7 +5,7 @@ class A { inner class Inner - class object { + default object { class Nested2 diff --git a/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.txt b/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.txt index ef7fe032e56..50633f5a713 100644 --- a/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.txt +++ b/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.txt @@ -9,7 +9,7 @@ package a { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val c: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.kt b/compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.kt index bea2ada539e..b2b0a974141 100644 --- a/compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.kt +++ b/compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.kt @@ -2,16 +2,16 @@ class A { inner class B { - class object { } + default object { } } } class B { - class object { + default object { class B { - class object { + default object { class C { - class object { } + default object { } } } } @@ -20,6 +20,6 @@ class B { class C { class D { - class object { } + default object { } } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.txt b/compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.txt index c2f3442f626..31f2daa1e5c 100644 --- a/compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.txt +++ b/compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.txt @@ -12,7 +12,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -27,7 +27,7 @@ internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -39,7 +39,7 @@ internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -51,7 +51,7 @@ internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -75,7 +75,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/classObjects/classObjectHeader.kt b/compiler/testData/diagnostics/tests/classObjects/classObjectHeader.kt index 0919a7339ac..d20e968cdb9 100644 --- a/compiler/testData/diagnostics/tests/classObjects/classObjectHeader.kt +++ b/compiler/testData/diagnostics/tests/classObjects/classObjectHeader.kt @@ -4,6 +4,6 @@ open class ToResolve(f : (Int) -> Int) fun testFun(a : Int) = 12 class TestSome

{ - class object : ToResolve<P>({testFun(it)}) { + default object : ToResolve<P>({testFun(it)}) { } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/classObjects/classObjectHeader.txt b/compiler/testData/diagnostics/tests/classObjects/classObjectHeader.txt index 581e2a3274f..f02cc3353ee 100644 --- a/compiler/testData/diagnostics/tests/classObjects/classObjectHeader.txt +++ b/compiler/testData/diagnostics/tests/classObjects/classObjectHeader.txt @@ -9,7 +9,7 @@ package test { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : test.ToResolve

{ + internal default object Default : test.ToResolve

{ private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/classObjects/classObjectInLocalClass.kt b/compiler/testData/diagnostics/tests/classObjects/classObjectInLocalClass.kt index cb070ed3a3f..b4f81f9f6c4 100644 --- a/compiler/testData/diagnostics/tests/classObjects/classObjectInLocalClass.kt +++ b/compiler/testData/diagnostics/tests/classObjects/classObjectInLocalClass.kt @@ -1,9 +1,9 @@ fun test() { class A { - class object {} + default object {} } object { - class object {} + default object {} } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.kt b/compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.kt index a7dc674c135..4e5db8eb0cd 100644 --- a/compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.kt +++ b/compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.kt @@ -3,11 +3,11 @@ package test class A { object Default - class object + default object } class B { - class object Named + default object Named object Named } @@ -15,5 +15,5 @@ class B { class C { class Named - class object Named + default object Named } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.txt b/compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.txt index 6d61dfdaa13..67dfe12d1c4 100644 --- a/compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.txt +++ b/compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.txt @@ -15,7 +15,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -36,7 +36,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Named { + internal default object Named { private constructor Named() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -57,7 +57,7 @@ package test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Named { + internal default object Named { private constructor Named() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.kt b/compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.kt index 912986ba430..1a4b6b353b5 100644 --- a/compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.kt +++ b/compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.kt @@ -3,7 +3,7 @@ package f import f.A.Default.B class A { - class object { + default object { class B } } diff --git a/compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.txt b/compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.txt index 3d3ea7b4414..dd29b09915f 100644 --- a/compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.txt +++ b/compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.txt @@ -9,7 +9,7 @@ package f { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt b/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt index 8e71ba12fc2..085afefd689 100644 --- a/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt +++ b/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt @@ -2,25 +2,25 @@ package a class A { - class object { + default object { fun foo() {} } } private class B { - class object { + default object { fun bar() {} } } class C { - private class object { + private default object { fun baz() {} } } private class D { - private class object { + private default object { fun quux() {} } } diff --git a/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.txt b/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.txt index fa0daff79d1..7f73b4a44a1 100644 --- a/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.txt +++ b/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.txt @@ -8,7 +8,7 @@ package a { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal final fun foo(): kotlin.Unit @@ -23,7 +23,7 @@ package a { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - private class object Default { + private default object Default { private constructor Default() internal final fun bar(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -38,7 +38,7 @@ package a { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - private class object Default { + private default object Default { private constructor Default() internal final fun baz(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -53,7 +53,7 @@ package a { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - private class object Default { + private default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/classObjects/kt3866.kt b/compiler/testData/diagnostics/tests/classObjects/kt3866.kt index cb65fb86312..d9fb9dd0291 100644 --- a/compiler/testData/diagnostics/tests/classObjects/kt3866.kt +++ b/compiler/testData/diagnostics/tests/classObjects/kt3866.kt @@ -4,11 +4,11 @@ open class C { fun C.foo() {} open class X { - class object : C() {} + default object : C() {} } open class Y { - class object : C() {} + default object : C() {} } fun bar() { diff --git a/compiler/testData/diagnostics/tests/classObjects/kt3866.txt b/compiler/testData/diagnostics/tests/classObjects/kt3866.txt index 6dcb55ca9b2..d1aadb17cc7 100644 --- a/compiler/testData/diagnostics/tests/classObjects/kt3866.txt +++ b/compiler/testData/diagnostics/tests/classObjects/kt3866.txt @@ -16,7 +16,7 @@ internal open class X { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : C { + internal default object Default : C { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -30,7 +30,7 @@ internal open class Y { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : C { + internal default object Default : C { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/classObjects/multipleDissallowedDefaultObjects.txt b/compiler/testData/diagnostics/tests/classObjects/multipleDissallowedDefaultObjects.txt index d8c08d5522c..3283a3a7855 100644 --- a/compiler/testData/diagnostics/tests/classObjects/multipleDissallowedDefaultObjects.txt +++ b/compiler/testData/diagnostics/tests/classObjects/multipleDissallowedDefaultObjects.txt @@ -12,21 +12,21 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object A { + internal default object A { private constructor A() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object B { + internal default object B { private constructor B() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object C { + internal default object C { private constructor C() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -41,21 +41,21 @@ internal object O { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object A { + internal default object A { private constructor A() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object B { + internal default object B { private constructor B() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object C { + internal default object C { private constructor C() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.kt b/compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.kt index 78230e91f3d..be681f32115 100644 --- a/compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.kt +++ b/compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.kt @@ -1,8 +1,8 @@ class A { - private class object { + private default object { class B { class C { - class object { + default object { fun foo() {} } } diff --git a/compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.txt b/compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.txt index e23758f3e95..a0c8752ff90 100644 --- a/compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.txt +++ b/compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.txt @@ -9,7 +9,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - private class object Default { + private default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -27,7 +27,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal final fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.kt b/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.kt index 3da729eb2f7..f69424bfef4 100644 --- a/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.kt +++ b/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.kt @@ -3,7 +3,7 @@ package test class Test { fun test(): Int = 12 - class object { + default object { val a = test() // Check if resolver will be able to infer type of a variable } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.txt b/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.txt index 516c4a00687..81f89d906c7 100644 --- a/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.txt +++ b/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.txt @@ -9,7 +9,7 @@ package test { internal final fun test(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val a: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt index ab8ca49ff50..a95c97a2127 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt @@ -247,7 +247,7 @@ class ForwardAccessToBackingField() { //kt-147 } class ClassObject() { - class object { + default object { val x : Int { diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.txt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.txt index 703d6a12f39..b3e33c8eead 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.txt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.txt @@ -49,7 +49,7 @@ package uninitialized_reassigned_variables { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val x: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.kt index 2ca36cd1d58..677df9edbc7 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.kt @@ -10,7 +10,7 @@ enum class Direction { } class A { - class object { + default object { } } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.txt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.txt index 0dee4737910..4f725c04b0f 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.txt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.txt @@ -12,7 +12,7 @@ package kt1185 { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt index a6dd76e1d22..30b37e678f9 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt @@ -13,7 +13,7 @@ object Obj { } class AClass() { - class object { + default object { val y : Any? = 2 } } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.txt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.txt index 0f534aae174..a5c3a326725 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.txt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.txt @@ -11,7 +11,7 @@ package example { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val y: kotlin.Any? = 2 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt b/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt index ce5be2a6be0..497b98d90a1 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt @@ -3,10 +3,10 @@ // KT-3464 Front-end shouldn't allow override modifier in class declaration override class A { - override class object {} - open class object {} - abstract class object {} - final class object {} + override default object {} + open default object {} + abstract default object {} + final default object {} } override object B1 {} diff --git a/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.txt b/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.txt index 5a34f6c489a..c8dd0db3b88 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.txt +++ b/compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.txt @@ -6,28 +6,28 @@ internal open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/defaultSetter.txt b/compiler/testData/diagnostics/tests/delegatedProperty/defaultSetter.txt index 7dc74dd3adc..b9239445f6d 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/defaultSetter.txt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/defaultSetter.txt @@ -1,4 +1,4 @@ -package +package internal var a: kotlin.Int diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.kt index 02e5e85df17..d05edaae0f9 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.kt @@ -1,5 +1,5 @@ class C { - class object { + default object { val x = 1 fun getX() = 1 } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.txt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.txt index 01cd43c37dd..7a5a8bab094 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.txt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.txt @@ -6,7 +6,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val x: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.kt index 433aca2c956..dfc68f1a3ba 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.kt @@ -1,11 +1,11 @@ class C { - class object {} + default object {} val Default = C } class D { - class object {} + default object {} val `OBJECT$` = D } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.txt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.txt index c4d122a00c7..2466d290dc3 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.txt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.txt @@ -7,7 +7,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -22,7 +22,7 @@ internal final class D { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.kt index f8208c91661..3b5ba2f2ce3 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.kt @@ -1,5 +1,5 @@ class C { - class object { + default object { val X = 1 val `X$1` = 1 } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.txt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.txt index 32d4f3f98d7..00d875f9ad0 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.txt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.txt @@ -7,7 +7,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val X: kotlin.Int = 1 internal final val `X$1`: kotlin.Int = 1 diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.kt index 8c8780618a9..4853ec2023a 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.kt @@ -1,5 +1,5 @@ class C { - class object { + default object { val Default = this } @@ -7,7 +7,7 @@ class C { } class D { - class object { + default object { val `OBJECT$` = this } diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.txt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.txt index 1f9acaec143..a988b4d8eea 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.txt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.txt @@ -7,7 +7,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val Default: C.Default public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -23,7 +23,7 @@ internal final class D { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val `OBJECT$`: D.Default public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/enum/classObjectInEnum.kt b/compiler/testData/diagnostics/tests/enum/classObjectInEnum.kt index 591f7fabdf0..76e610b22c0 100644 --- a/compiler/testData/diagnostics/tests/enum/classObjectInEnum.kt +++ b/compiler/testData/diagnostics/tests/enum/classObjectInEnum.kt @@ -1,7 +1,7 @@ enum class E { ENTRY - class object { + default object { fun entry() = ENTRY } } diff --git a/compiler/testData/diagnostics/tests/enum/classObjectInEnum.txt b/compiler/testData/diagnostics/tests/enum/classObjectInEnum.txt index fcefd64e1b0..a1a608ae87d 100644 --- a/compiler/testData/diagnostics/tests/enum/classObjectInEnum.txt +++ b/compiler/testData/diagnostics/tests/enum/classObjectInEnum.txt @@ -21,7 +21,7 @@ internal final enum class E : kotlin.Enum { public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final fun entry(): E public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.kt b/compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.kt index 75e83840075..5b0d97e7e26 100644 --- a/compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.kt +++ b/compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.kt @@ -1,7 +1,7 @@ enum class E { ENTRY - private class object + private default object } fun foo() = E.values() diff --git a/compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.txt b/compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.txt index 36f9f67ff36..2b564fc63ff 100644 --- a/compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.txt +++ b/compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.txt @@ -24,7 +24,7 @@ internal final enum class E : kotlin.Enum { public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - private class object Default { + private default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.kt b/compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.kt index 3286a9be55e..11e7cff36f7 100644 --- a/compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.kt +++ b/compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.kt @@ -2,7 +2,7 @@ enum class E { FIRST SECOND { - class object { + default object { fun foo() = 42 } } diff --git a/compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.txt b/compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.txt index f211db14d81..d4f3bd60a89 100644 --- a/compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.txt +++ b/compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.txt @@ -22,7 +22,7 @@ internal final enum class E : kotlin.Enum { public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public class object Default { + public default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal final fun foo(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/enum/enumModifier.kt b/compiler/testData/diagnostics/tests/enum/enumModifier.kt index be6fcb280b4..6b1efccfbbf 100644 --- a/compiler/testData/diagnostics/tests/enum/enumModifier.kt +++ b/compiler/testData/diagnostics/tests/enum/enumModifier.kt @@ -1,7 +1,7 @@ enum class B {} class A { - enum class object {} + enum default object {} } enum object O {} diff --git a/compiler/testData/diagnostics/tests/enum/enumModifier.txt b/compiler/testData/diagnostics/tests/enum/enumModifier.txt index cf3d7bde1ae..feeaf926c8c 100644 --- a/compiler/testData/diagnostics/tests/enum/enumModifier.txt +++ b/compiler/testData/diagnostics/tests/enum/enumModifier.txt @@ -10,7 +10,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/enum/inner/existingClassObject.kt b/compiler/testData/diagnostics/tests/enum/inner/existingClassObject.kt index 3a0438c2483..440197fec79 100644 --- a/compiler/testData/diagnostics/tests/enum/inner/existingClassObject.kt +++ b/compiler/testData/diagnostics/tests/enum/inner/existingClassObject.kt @@ -3,14 +3,14 @@ class A { ENTRY } - class object { + default object { } } class B { - class object { + default object { } enum class E { diff --git a/compiler/testData/diagnostics/tests/enum/inner/existingClassObject.txt b/compiler/testData/diagnostics/tests/enum/inner/existingClassObject.txt index 8c805872161..723c15cfe23 100644 --- a/compiler/testData/diagnostics/tests/enum/inner/existingClassObject.txt +++ b/compiler/testData/diagnostics/tests/enum/inner/existingClassObject.txt @@ -6,7 +6,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -44,7 +44,7 @@ internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/enum/inner/insideClassObject.kt b/compiler/testData/diagnostics/tests/enum/inner/insideClassObject.kt index aaafb505abb..d95b4797609 100644 --- a/compiler/testData/diagnostics/tests/enum/inner/insideClassObject.kt +++ b/compiler/testData/diagnostics/tests/enum/inner/insideClassObject.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { enum class E { ENTRY } diff --git a/compiler/testData/diagnostics/tests/enum/inner/insideClassObject.txt b/compiler/testData/diagnostics/tests/enum/inner/insideClassObject.txt index 583ba64eb9b..eaca0c96064 100644 --- a/compiler/testData/diagnostics/tests/enum/inner/insideClassObject.txt +++ b/compiler/testData/diagnostics/tests/enum/inner/insideClassObject.txt @@ -6,7 +6,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.kt b/compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.kt index 75569dd004a..8d9dbfad721 100644 --- a/compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.kt +++ b/compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.kt @@ -3,7 +3,7 @@ class A { ENTRY } - class object { + default object { enum class E { ENTRY2 } diff --git a/compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.txt b/compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.txt index 03d656f6d1e..23e79f94d6a 100644 --- a/compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.txt +++ b/compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.txt @@ -6,7 +6,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.kt b/compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.kt index 68c6904ca23..146ae72f0f4 100644 --- a/compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.kt +++ b/compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { enum class E { ENTRY } // OK } diff --git a/compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.txt b/compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.txt index bcd72307232..d7aee6f9ed1 100644 --- a/compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.txt +++ b/compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.txt @@ -37,7 +37,7 @@ internal final class A { } } - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt b/compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt index 55850414848..76dd2cd2c7b 100644 --- a/compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt +++ b/compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt @@ -6,7 +6,7 @@ enum class E { ANOTHER class Nested { - class object { + default object { fun foo() = 42 } } diff --git a/compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.txt b/compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.txt index 2b456cc8ba5..cde99a9473a 100644 --- a/compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.txt +++ b/compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.txt @@ -45,7 +45,7 @@ package foo { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal final fun foo(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.kt b/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.kt index 3d5dcbae0c5..afcf88f1379 100644 --- a/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.kt +++ b/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.kt @@ -1,7 +1,7 @@ enum class E { ENTRY - class object { + default object { fun foo(): E = ENTRY fun bar(): Array = values() fun baz(): E = valueOf("ENTRY") diff --git a/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.txt b/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.txt index 30a9ea00212..9879893af82 100644 --- a/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.txt +++ b/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.txt @@ -29,7 +29,7 @@ internal final enum class E : kotlin.Enum { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String internal final fun zab(): E - internal class object Default { + internal default object Default { private constructor Default() internal final val valuez: kotlin.Array internal final fun bar(): kotlin.Array diff --git a/compiler/testData/diagnostics/tests/extensions/classObject.kt b/compiler/testData/diagnostics/tests/extensions/classObject.kt index 762a9d836d7..0081ea5beec 100644 --- a/compiler/testData/diagnostics/tests/extensions/classObject.kt +++ b/compiler/testData/diagnostics/tests/extensions/classObject.kt @@ -1,7 +1,7 @@ trait Tr -class A { class object } -class B { class object : Tr } +class A { default object } +class B { default object : Tr } fun Any.f1() {} fun Any?.f2() {} diff --git a/compiler/testData/diagnostics/tests/extensions/classObject.txt b/compiler/testData/diagnostics/tests/extensions/classObject.txt index faec44d9238..439e033bdfa 100644 --- a/compiler/testData/diagnostics/tests/extensions/classObject.txt +++ b/compiler/testData/diagnostics/tests/extensions/classObject.txt @@ -13,7 +13,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -27,7 +27,7 @@ internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : Tr { + internal default object Default : Tr { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt b/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt index 08174cbd6fe..3ca7a41ca7f 100644 --- a/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt +++ b/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt @@ -5,7 +5,7 @@ trait JPAEntityClass { } class Foo { - class object : JPAEntityClass + default object : JPAEntityClass } fun main(args: Array) { diff --git a/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.txt b/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.txt index a29c4f258d9..89bc70b1ff7 100644 --- a/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.txt +++ b/compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.txt @@ -9,7 +9,7 @@ internal final class Foo { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : JPAEntityClass { + internal default object Default : JPAEntityClass { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/extensions/kt3470.kt b/compiler/testData/diagnostics/tests/extensions/kt3470.kt index 720e19f2009..013dec39342 100644 --- a/compiler/testData/diagnostics/tests/extensions/kt3470.kt +++ b/compiler/testData/diagnostics/tests/extensions/kt3470.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { fun foo() = toString() } } diff --git a/compiler/testData/diagnostics/tests/extensions/kt3470.txt b/compiler/testData/diagnostics/tests/extensions/kt3470.txt index 9a304e14b04..91b99a5364a 100644 --- a/compiler/testData/diagnostics/tests/extensions/kt3470.txt +++ b/compiler/testData/diagnostics/tests/extensions/kt3470.txt @@ -8,7 +8,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal final fun foo(): kotlin.String diff --git a/compiler/testData/diagnostics/tests/imports/Imports.kt b/compiler/testData/diagnostics/tests/imports/Imports.kt index 97b22a4ca34..0fc409835de 100644 --- a/compiler/testData/diagnostics/tests/imports/Imports.kt +++ b/compiler/testData/diagnostics/tests/imports/Imports.kt @@ -5,12 +5,12 @@ import b.B //class import b.foo //function import b.ext //extension function import b.value //property -import b.C.Default.bar //function from class object -import b.C.Default.cValue //property from class object +import b.C.Default.bar //function from default object +import b.C.Default.cValue //property from default object import b.constant.fff //function from val import b.constant.dValue //property from val import b.constant -import b.E.Default.f //val from class object +import b.E.Default.f //val from default object import smth.illegal import b.C.smth.illegal import b.bar.smth @@ -42,7 +42,7 @@ fun B.ext() {} val value = 0 class C() { - class object { + default object { fun bar() {} val cValue = 1 } @@ -56,7 +56,7 @@ class D() { val constant = D() class E() { - class object { + default object { val f = F() } } @@ -92,7 +92,7 @@ val b : B = B() val c : B = C class A() { - class object { + default object { open class B() {} object C : B() {} } diff --git a/compiler/testData/diagnostics/tests/imports/Imports.txt b/compiler/testData/diagnostics/tests/imports/Imports.txt index 19b517e81b1..6764355891e 100644 --- a/compiler/testData/diagnostics/tests/imports/Imports.txt +++ b/compiler/testData/diagnostics/tests/imports/Imports.txt @@ -24,7 +24,7 @@ package b { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val cValue: kotlin.Int = 1 internal final fun bar(): kotlin.Unit @@ -49,7 +49,7 @@ package b { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val f: b.F public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -90,7 +90,7 @@ package d { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/imports/StarImportFromObject.kt b/compiler/testData/diagnostics/tests/imports/StarImportFromObject.kt index 1de1a401604..9818fd785fd 100644 --- a/compiler/testData/diagnostics/tests/imports/StarImportFromObject.kt +++ b/compiler/testData/diagnostics/tests/imports/StarImportFromObject.kt @@ -30,7 +30,7 @@ class A { object J } - class object CO { + default object CO { object H } } diff --git a/compiler/testData/diagnostics/tests/imports/StarImportFromObject.txt b/compiler/testData/diagnostics/tests/imports/StarImportFromObject.txt index 33f69c6447d..49a347042c2 100644 --- a/compiler/testData/diagnostics/tests/imports/StarImportFromObject.txt +++ b/compiler/testData/diagnostics/tests/imports/StarImportFromObject.txt @@ -22,7 +22,7 @@ package a { } } - internal class object CO { + internal default object CO { private constructor CO() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt702.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt702.kt index 3934c5c4235..27ecf297f02 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt702.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt702.kt @@ -5,7 +5,7 @@ package a fun getJavaClass() : java.lang.Class { } public class Throwables() { - class object { + default object { public fun propagateIfInstanceOf(throwable : Throwable?, declaredType : Class?>?) : Unit { if (((throwable != null) && declaredType?.isInstance(throwable)!!)) { diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt702.txt b/compiler/testData/diagnostics/tests/inference/regressions/kt702.txt index 93105b1e7a8..cfab2c628be 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt702.txt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt702.txt @@ -9,7 +9,7 @@ package a { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public class object Default { + public default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.kt b/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.kt index 4426e63b9f8..c338b6ee408 100644 --- a/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.kt +++ b/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.kt @@ -1,6 +1,6 @@ class Test { [`InnerAnnotation`InnerAnnotation] - class object : StaticClass(), InnerClass() { + default object : StaticClass(), InnerClass() { } diff --git a/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.txt b/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.txt index 2b0c90ad8a8..10399c337dd 100644 --- a/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.txt +++ b/compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.txt @@ -6,7 +6,7 @@ internal final class Test { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - Test.InnerAnnotation() Test.InnerAnnotation() internal class object Default : Test.StaticClass, Test.InnerClass { + Test.InnerAnnotation() Test.InnerAnnotation() internal default object Default : Test.StaticClass, Test.InnerClass { private constructor Default() public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/deepInnerClass.kt b/compiler/testData/diagnostics/tests/inner/deepInnerClass.kt index ad3d39ebd75..b9316d1aa31 100644 --- a/compiler/testData/diagnostics/tests/inner/deepInnerClass.kt +++ b/compiler/testData/diagnostics/tests/inner/deepInnerClass.kt @@ -4,7 +4,7 @@ class A { class B { fun test() { class C() : PT> { - class object : P<W, T> { + default object : P<W, T> { } inner class D : PT> diff --git a/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt b/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt index 935122113a9..c523d23bac9 100644 --- a/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt +++ b/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt @@ -7,7 +7,7 @@ object A { } class B { - class object { + default object { class LoginFormPage() : Request({ val failed = session.get("LOGIN_FAILED") }) diff --git a/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.txt b/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.txt index 21a848d218f..eb4665571c2 100644 --- a/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.txt +++ b/compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.txt @@ -45,7 +45,7 @@ package f { } } - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/illegalModifier.kt b/compiler/testData/diagnostics/tests/inner/illegalModifier.kt index 8248a08b479..a6f040fff64 100644 --- a/compiler/testData/diagnostics/tests/inner/illegalModifier.kt +++ b/compiler/testData/diagnostics/tests/inner/illegalModifier.kt @@ -11,7 +11,7 @@ class D { inner object G inner enum class R inner annotation class S - inner class object + inner default object } enum class H { @@ -31,7 +31,7 @@ object N { } class P { - class object { + default object { inner class Q } } diff --git a/compiler/testData/diagnostics/tests/inner/illegalModifier.txt b/compiler/testData/diagnostics/tests/inner/illegalModifier.txt index ee714356701..45620b8d7c4 100644 --- a/compiler/testData/diagnostics/tests/inner/illegalModifier.txt +++ b/compiler/testData/diagnostics/tests/inner/illegalModifier.txt @@ -30,7 +30,7 @@ internal final class D { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -150,7 +150,7 @@ internal final class P { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.kt b/compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.kt index 68798c8f33a..93fb37d2e17 100644 --- a/compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.kt +++ b/compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { fun test(t: TestInner) = 42 } diff --git a/compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.txt b/compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.txt index e99a1cbefd9..a5a5984a6ba 100644 --- a/compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.txt +++ b/compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.txt @@ -6,7 +6,7 @@ internal final class Test { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.kt b/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.kt index eac005ac624..fab6114c5a3 100644 --- a/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.kt +++ b/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.kt @@ -1,11 +1,11 @@ open class SomeClass class TestSome

{ - class object : SomeClass<P>() { + default object : SomeClass<P>() { } } class Test { - class object : InnerClass() { + default object : InnerClass() { val a = object: InnerClass() { } diff --git a/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.txt b/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.txt index dbc4af0f835..72c6e7ee52f 100644 --- a/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.txt +++ b/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.txt @@ -15,7 +15,7 @@ internal final class Test { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : Test.InnerClass { + internal default object Default : Test.InnerClass { private constructor Default() internal final val a: Test.InnerClass public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -38,7 +38,7 @@ internal final class TestSome { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : SomeClass

{ + internal default object Default : SomeClass

{ private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt b/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt index 0bd87c9ae02..01338933bcd 100644 --- a/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt +++ b/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt @@ -1,24 +1,24 @@ trait N { fun foo() = 1 } class WithClassObject { - class object {} + default object {} class Nested() - class NestedWithClassObject { class object : N } + class NestedWithClassObject { default object : N } enum class NestedEnum { A } object NestedObj : N { fun invoke() = 1 } } class WithoutClassObject { class Nested() - class NestedWithClassObject { class object : N } + class NestedWithClassObject { default object : N } enum class NestedEnum { A } object NestedObj : N { fun invoke() = 1 } } object Obj { class Nested() - class NestedWithClassObject { class object : N } + class NestedWithClassObject { default object : N } enum class NestedEnum { A } object NestedObj : N { fun invoke() = 1 } } diff --git a/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.txt b/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.txt index 9defe4b3924..52074c1cfc7 100644 --- a/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.txt +++ b/compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.txt @@ -61,7 +61,7 @@ internal object Obj { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : N { + internal default object Default : N { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal open override /*1*/ /*fake_override*/ fun foo(): kotlin.Int @@ -77,7 +77,7 @@ internal final class WithClassObject { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -130,7 +130,7 @@ internal final class WithClassObject { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : N { + internal default object Default : N { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal open override /*1*/ /*fake_override*/ fun foo(): kotlin.Int @@ -192,7 +192,7 @@ internal final class WithoutClassObject { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : N { + internal default object Default : N { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal open override /*1*/ /*fake_override*/ fun foo(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.kt b/compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.kt index 514a0a3767d..dfa71fa7a0e 100644 --- a/compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.kt +++ b/compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.kt @@ -1,11 +1,11 @@ class Outer { class Nested { - class object { + default object { fun foo() = 42 } } - class object { + default object { fun bar() = 239 } } diff --git a/compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.txt b/compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.txt index fa8cc4ffb77..5a19ea0d297 100644 --- a/compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.txt +++ b/compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.txt @@ -9,7 +9,7 @@ internal final class Outer { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final fun bar(): kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -23,7 +23,7 @@ internal final class Outer { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal final fun foo(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.kt b/compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.kt index d168e77b3dd..8fc800a83ef 100644 --- a/compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.kt +++ b/compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.kt @@ -1,7 +1,7 @@ open class PackageTest class MoreTest() { - class object: PackageTest() { + default object: PackageTest() { } diff --git a/compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.txt b/compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.txt index 5bf4bd53160..c0928b2f8e4 100644 --- a/compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.txt +++ b/compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.txt @@ -6,7 +6,7 @@ internal final class MoreTest { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : PackageTest { + internal default object Default : PackageTest { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt b/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt index 668bf4eb8c8..77c97bf74ce 100644 --- a/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt +++ b/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt @@ -1,7 +1,7 @@ class Test { [ClassObjectAnnotation] [NestedAnnotation] - class object { + default object { annotation class ClassObjectAnnotation } diff --git a/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.txt b/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.txt index fca99511db7..4fa80d77371 100644 --- a/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.txt +++ b/compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.txt @@ -6,7 +6,7 @@ internal final class Test { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - Test.Default.ClassObjectAnnotation() Test.NestedAnnotation() internal class object Default { + Test.Default.ClassObjectAnnotation() Test.NestedAnnotation() internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt b/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt index b61381c87e0..aaece5b28c5 100644 --- a/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt +++ b/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt @@ -6,7 +6,7 @@ public interface I extends Boo { // FILE: Baz.kt public trait Foo { - class object { + default object { public val EMPTY: Foo = object : Foo{} } } diff --git a/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.txt b/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.txt index b068875109b..2d584881adf 100644 --- a/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.txt +++ b/compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.txt @@ -31,7 +31,7 @@ public trait Foo { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public class object Default { + public default object Default { private constructor Default() public final val EMPTY: Foo public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.kt b/compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.kt index 18f716a58f3..fd76487c2fa 100644 --- a/compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.kt +++ b/compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.kt @@ -1,5 +1,5 @@ class Foo { - class object { + default object { val bar = 1 fun test(a: Foo.`object`) { diff --git a/compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.txt b/compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.txt index 126d94b9df7..7b0e204fdd7 100644 --- a/compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.txt +++ b/compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.txt @@ -6,7 +6,7 @@ internal final class Foo { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val bar: kotlin.Int = 1 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/j+k/javaStaticImport.kt b/compiler/testData/diagnostics/tests/j+k/javaStaticImport.kt index 32ec476d58a..0a143084ca3 100644 --- a/compiler/testData/diagnostics/tests/j+k/javaStaticImport.kt +++ b/compiler/testData/diagnostics/tests/j+k/javaStaticImport.kt @@ -16,7 +16,7 @@ public class AsmUtil { // FILE: First.kt package frontend public class JvmDeclarationOrigin { - class object { + default object { public val NO_ORIGIN: JvmDeclarationOrigin = JvmDeclarationOrigin() } } diff --git a/compiler/testData/diagnostics/tests/j+k/javaStaticImport.txt b/compiler/testData/diagnostics/tests/j+k/javaStaticImport.txt index cb20b728a79..de71f804af2 100644 --- a/compiler/testData/diagnostics/tests/j+k/javaStaticImport.txt +++ b/compiler/testData/diagnostics/tests/j+k/javaStaticImport.txt @@ -32,7 +32,7 @@ package frontend { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public class object Default { + public default object Default { private constructor Default() public final val NO_ORIGIN: frontend.JvmDeclarationOrigin public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/modifiers/defaultModifier.txt b/compiler/testData/diagnostics/tests/modifiers/defaultModifier.txt index e4ecd964692..cc2001b7a06 100644 --- a/compiler/testData/diagnostics/tests/modifiers/defaultModifier.txt +++ b/compiler/testData/diagnostics/tests/modifiers/defaultModifier.txt @@ -9,7 +9,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -24,7 +24,7 @@ internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -38,7 +38,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object A { + internal default object A { private constructor A() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -52,13 +52,13 @@ internal final class D { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object A { + internal default object A { private constructor A() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -96,7 +96,7 @@ internal final enum class Enum : kotlin.Enum { public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -114,7 +114,7 @@ internal object G { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -127,7 +127,7 @@ internal trait H { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -141,13 +141,13 @@ internal final class J { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object C { + internal default object C { private constructor C() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.kt index 27221f8e8db..8f1f406ac7f 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.kt @@ -7,7 +7,7 @@ package p public class A { public class B public object C - class object { + default object { public class D { public object E } @@ -35,7 +35,7 @@ package p public class A { public class B public class C - class object { + default object { public class D { public class E } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.txt b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.txt index 8edcd908c75..f05286f5dae 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.txt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.txt @@ -23,7 +23,7 @@ package p { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - public class object Default { + public default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -107,7 +107,7 @@ package p { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - public class object Default { + public default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.kt b/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.kt index 2bcf74a1055..d798bf97531 100644 --- a/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.kt +++ b/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.kt @@ -4,7 +4,7 @@ fun test() { } class A() { - class object { + default object { object f { fun invoke(i: Int) = i } diff --git a/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.txt b/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.txt index cc00b95bbc2..056c4b1434d 100644 --- a/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.txt +++ b/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.txt @@ -8,7 +8,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt b/compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt index 02fa5eac1c3..1e700b84593 100644 --- a/compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt +++ b/compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt @@ -5,5 +5,5 @@ object O1 : Trait object O2 : Trait<String> class C { - class object : Trait<IntRange> + default object : Trait<IntRange> } diff --git a/compiler/testData/diagnostics/tests/objects/upperBoundViolated.txt b/compiler/testData/diagnostics/tests/objects/upperBoundViolated.txt index 094e05515c6..c53984f2a68 100644 --- a/compiler/testData/diagnostics/tests/objects/upperBoundViolated.txt +++ b/compiler/testData/diagnostics/tests/objects/upperBoundViolated.txt @@ -6,7 +6,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : Trait { + internal default object Default : Trait { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.kt b/compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.kt index 10d22edc36b..43f07a8abb3 100644 --- a/compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.kt +++ b/compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.kt @@ -13,7 +13,7 @@ class Tram { } class Yvayva { - class object { + default object { fun fghj() { } class fghj() { } @@ -23,7 +23,7 @@ class Yvayva { class Rtyu { fun ololo() { } - class object { + default object { class ololo() { } } } diff --git a/compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.txt b/compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.txt index 78629323b6e..e443254d96d 100644 --- a/compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.txt +++ b/compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.txt @@ -10,7 +10,7 @@ package constructorVsFun { internal final fun ololo(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -46,7 +46,7 @@ package constructorVsFun { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal final fun fghj(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/override/kt4785classObject.kt b/compiler/testData/diagnostics/tests/override/kt4785classObject.kt index 07c99c7a756..ca58cf81665 100644 --- a/compiler/testData/diagnostics/tests/override/kt4785classObject.kt +++ b/compiler/testData/diagnostics/tests/override/kt4785classObject.kt @@ -7,7 +7,7 @@ trait B { } class C { - class object : A, B { + default object : A, B { fun bar() = null } } diff --git a/compiler/testData/diagnostics/tests/override/kt4785classObject.txt b/compiler/testData/diagnostics/tests/override/kt4785classObject.txt index 458f90c3420..bed14310fad 100644 --- a/compiler/testData/diagnostics/tests/override/kt4785classObject.txt +++ b/compiler/testData/diagnostics/tests/override/kt4785classObject.txt @@ -20,7 +20,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : A, B { + internal default object Default : A, B { private constructor Default() internal final fun bar(): kotlin.Nothing? public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/redeclarations/EnumEntriesAndClassObjectMembers.kt b/compiler/testData/diagnostics/tests/redeclarations/EnumEntriesAndClassObjectMembers.kt index e8eb3711c21..65e45da4d37 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/EnumEntriesAndClassObjectMembers.kt +++ b/compiler/testData/diagnostics/tests/redeclarations/EnumEntriesAndClassObjectMembers.kt @@ -3,7 +3,7 @@ enum class E { SECOND - class object { + default object { class FIRST val SECOND = this diff --git a/compiler/testData/diagnostics/tests/redeclarations/EnumEntriesAndClassObjectMembers.txt b/compiler/testData/diagnostics/tests/redeclarations/EnumEntriesAndClassObjectMembers.txt index 7bd47d5bd2c..f1eb2c7ed0f 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/EnumEntriesAndClassObjectMembers.txt +++ b/compiler/testData/diagnostics/tests/redeclarations/EnumEntriesAndClassObjectMembers.txt @@ -29,7 +29,7 @@ internal final enum class E : kotlin.Enum { public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val SECOND: E.Default public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.kt b/compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.kt index afa9b89aa2b..8428d162f9e 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.kt +++ b/compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.kt @@ -5,7 +5,7 @@ public class A() { } public class B() { - class object { + default object { public val FOO: String = "test" public class FOO() { } diff --git a/compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.txt b/compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.txt index e396e202ecb..9c59fd47290 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.txt +++ b/compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.txt @@ -21,7 +21,7 @@ public final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public class object Default { + public default object Default { private constructor Default() public final val FOO: kotlin.String = "test" public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/redeclarations/kt2247.kt b/compiler/testData/diagnostics/tests/redeclarations/kt2247.kt index 744681c4d83..6addeabf500 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/kt2247.kt +++ b/compiler/testData/diagnostics/tests/redeclarations/kt2247.kt @@ -1,9 +1,9 @@ -//KT-2247 Report name clashes between inner classes and members of class object +//KT-2247 Report name clashes between inner classes and members of default object package kt2247 class B { - class object { + default object { class Y { } } diff --git a/compiler/testData/diagnostics/tests/redeclarations/kt2247.txt b/compiler/testData/diagnostics/tests/redeclarations/kt2247.txt index f960c57b362..b192d3a18ca 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/kt2247.txt +++ b/compiler/testData/diagnostics/tests/redeclarations/kt2247.txt @@ -8,7 +8,7 @@ package kt2247 { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/redeclarations/kt2438.kt b/compiler/testData/diagnostics/tests/redeclarations/kt2438.kt index a9ebccdadbd..e236ee0a1fc 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/kt2438.kt +++ b/compiler/testData/diagnostics/tests/redeclarations/kt2438.kt @@ -12,7 +12,7 @@ class B { class A { class B - class object { + default object { class B class B } diff --git a/compiler/testData/diagnostics/tests/redeclarations/kt2438.txt b/compiler/testData/diagnostics/tests/redeclarations/kt2438.txt index 69fb67d2a07..6bc5da4790a 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/kt2438.txt +++ b/compiler/testData/diagnostics/tests/redeclarations/kt2438.txt @@ -22,7 +22,7 @@ package kt2438 { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/regressions/kt3647.kt b/compiler/testData/diagnostics/tests/regressions/kt3647.kt index d9cbb3c9fd7..494e4b73ade 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt3647.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt3647.kt @@ -1,7 +1,7 @@ // KT-3647 Unexpected compilation error: "Expression is inaccessible from a nested class" class Test(val value: Int) { - class object { + default object { fun create(init: () -> Int): Test { return Test(init()) } diff --git a/compiler/testData/diagnostics/tests/regressions/kt3647.txt b/compiler/testData/diagnostics/tests/regressions/kt3647.txt index ab4502dc0c1..55b59779a4c 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt3647.txt +++ b/compiler/testData/diagnostics/tests/regressions/kt3647.txt @@ -7,7 +7,7 @@ internal final class Test { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final fun create(/*0*/ init: () -> kotlin.Int): Test public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/regressions/kt394.kt b/compiler/testData/diagnostics/tests/regressions/kt394.kt index a03f8c9165c..a4ea99d08d4 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt394.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt394.kt @@ -1,9 +1,9 @@ -// KT-394 Make class object members visible inside the owning class +// KT-394 Make default object members visible inside the owning class class X() { // class Y {} - class object{ + default object{ class Y() {} } diff --git a/compiler/testData/diagnostics/tests/regressions/kt394.txt b/compiler/testData/diagnostics/tests/regressions/kt394.txt index 0d980ab69f5..31ef07d0d12 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt394.txt +++ b/compiler/testData/diagnostics/tests/regressions/kt394.txt @@ -7,7 +7,7 @@ internal final class X { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.kt b/compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.kt index ad56cce9ac3..16783107737 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.kt @@ -4,7 +4,7 @@ package demo class Foo { - class object { + default object { class Bar() { } } } diff --git a/compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.txt b/compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.txt index 835daad1634..224ee6e3499 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.txt +++ b/compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.txt @@ -8,7 +8,7 @@ package demo { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/regressions/kt575.kt b/compiler/testData/diagnostics/tests/regressions/kt575.kt index 824811c3fa9..0a1fd8f01d1 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt575.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt575.kt @@ -1,9 +1,9 @@ -// KT-575 Cannot ++ a class object member +// KT-575 Cannot ++ a default object member package kt575 class Creature() { - class object { + default object { var numCreated : Int = 0 private set } diff --git a/compiler/testData/diagnostics/tests/regressions/kt575.txt b/compiler/testData/diagnostics/tests/regressions/kt575.txt index d6898180744..973fdac4ce4 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt575.txt +++ b/compiler/testData/diagnostics/tests/regressions/kt575.txt @@ -24,7 +24,7 @@ package kt575 { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() internal final var numCreated: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/regressions/kt588.kt b/compiler/testData/diagnostics/tests/regressions/kt588.kt index fee5c198ebc..309501ca125 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt588.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt588.kt @@ -1,7 +1,7 @@ // KT-588 Unresolved static method class Test() : Thread("Test") { - class object { + default object { fun init2() { } diff --git a/compiler/testData/diagnostics/tests/regressions/kt588.txt b/compiler/testData/diagnostics/tests/regressions/kt588.txt index 0048a88abc6..cc9751b7498 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt588.txt +++ b/compiler/testData/diagnostics/tests/regressions/kt588.txt @@ -71,7 +71,7 @@ internal final class Test : java.lang.Thread { invisible_fake open override /*1*/ /*fake_override*/ fun suspend0(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String! - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/regressions/kt701.kt b/compiler/testData/diagnostics/tests/regressions/kt701.kt index 272e865bc86..56c1d6a31d8 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt701.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt701.kt @@ -2,7 +2,7 @@ fun getJavaClass() : java.lang.Class { return "" as Class } public class Throwables() { - class object { + default object { public fun propagateIfInstanceOf(throwable : Throwable?, declaredType : Class?>?) { if (((throwable != null) && declaredType?.isInstance(throwable)!!)) { diff --git a/compiler/testData/diagnostics/tests/regressions/kt701.txt b/compiler/testData/diagnostics/tests/regressions/kt701.txt index 8b68ea70e45..01b367dadee 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt701.txt +++ b/compiler/testData/diagnostics/tests/regressions/kt701.txt @@ -8,7 +8,7 @@ public final class Throwables { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public class object Default { + public default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.kt b/compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.kt index 07cdca46b10..de3ff0f0eaf 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.kt @@ -1,4 +1,4 @@ -//KT-3833 Invoke method not working inside class object? +//KT-3833 Invoke method not working inside default object? package m class Either1 { @@ -26,7 +26,7 @@ object Foo{ } class C{ - class object { + default object { fun f(){ Foo.v() } diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.txt b/compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.txt index 6ef632f6d61..51e1150d2fb 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.txt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.txt @@ -8,7 +8,7 @@ package m { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal final fun f(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.kt b/compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.kt index 939c5b3f407..9e7ccdf4a67 100644 --- a/compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.kt +++ b/compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { } } diff --git a/compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.txt b/compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.txt index e18d5370ae0..0c960519873 100644 --- a/compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.txt +++ b/compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.txt @@ -9,7 +9,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.kt b/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.kt index fa1e3085ffe..b2166ab85c7 100644 --- a/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.kt +++ b/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.kt @@ -1,7 +1,7 @@ fun devNull(obj: Any?) {} open class A { - class object { + default object { val internal_val = 1 public val public_val: Int = 2 private val private_val = 3 diff --git a/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.txt b/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.txt index 000bc98788d..d95a7395044 100644 --- a/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.txt +++ b/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.txt @@ -10,7 +10,7 @@ internal open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val internal_val: kotlin.Int = 1 private final val private_val: kotlin.Int = 3 diff --git a/compiler/testData/diagnostics/tests/scopes/kt587.kt b/compiler/testData/diagnostics/tests/scopes/kt587.kt index b61a4bb5688..ac04a22f0e9 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt587.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt587.kt @@ -1,9 +1,9 @@ // KT-587 Unresolved reference class Main { - class object { + default object { class States() { - class object { + default object { public val N: States = States() // : States unresolved } } diff --git a/compiler/testData/diagnostics/tests/scopes/kt587.txt b/compiler/testData/diagnostics/tests/scopes/kt587.txt index cbc53fd71a9..07cbed8f5f2 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt587.txt +++ b/compiler/testData/diagnostics/tests/scopes/kt587.txt @@ -6,7 +6,7 @@ internal final class Main { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -18,7 +18,7 @@ internal final class Main { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public final val N: Main.Default.States public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/scopes/kt900-1.kt b/compiler/testData/diagnostics/tests/scopes/kt900-1.kt index d51e9bbdd81..bb0da7d73a3 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt900-1.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt900-1.kt @@ -1,4 +1,4 @@ -// import all members from class object +// import all members from default object package c import c.A.Default.B @@ -10,9 +10,9 @@ fun foo() { } class A() { - class object { + default object { class B() { - class object { + default object { } } } diff --git a/compiler/testData/diagnostics/tests/scopes/kt900-1.txt b/compiler/testData/diagnostics/tests/scopes/kt900-1.txt index 903526f0b89..17d7ae85e90 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt900-1.txt +++ b/compiler/testData/diagnostics/tests/scopes/kt900-1.txt @@ -9,7 +9,7 @@ package c { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -21,7 +21,7 @@ package c { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/scopes/kt900.kt b/compiler/testData/diagnostics/tests/scopes/kt900.kt index 142036d84d9..755aeb03825 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt900.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt900.kt @@ -13,9 +13,9 @@ fun foo() { } class A() { - class object { + default object { class B() { - class object { + default object { fun foo() {} } } @@ -49,9 +49,9 @@ fun foo() { } class A() { - class object { + default object { class B() { - class object { + default object { fun foo() {} } } diff --git a/compiler/testData/diagnostics/tests/scopes/kt900.txt b/compiler/testData/diagnostics/tests/scopes/kt900.txt index 4fc973dd39f..4ccbbbf5c02 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt900.txt +++ b/compiler/testData/diagnostics/tests/scopes/kt900.txt @@ -9,7 +9,7 @@ package a { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -21,7 +21,7 @@ package a { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal final fun foo(): kotlin.Unit @@ -65,7 +65,7 @@ package b { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -77,7 +77,7 @@ package b { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean internal final fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.kt b/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.kt index 5498c11f7ef..81b345fc81f 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.kt @@ -3,12 +3,12 @@ open class T { } class A { - class object: T() { + default object: T() { } } class B { - class object: T() { + default object: T() { } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.txt b/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.txt index e6bc0147b16..277fb4a7d29 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.txt +++ b/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.txt @@ -9,7 +9,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : T { + internal default object Default : T { private constructor Default() internal final override /*1*/ /*fake_override*/ val x: kotlin.Int? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -24,7 +24,7 @@ internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default : T { + internal default object Default : T { private constructor Default() internal final override /*1*/ /*fake_override*/ val x: kotlin.Int? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/subtyping/kt2069.kt b/compiler/testData/diagnostics/tests/subtyping/kt2069.kt index 92a5ff0157f..96de1603900 100644 --- a/compiler/testData/diagnostics/tests/subtyping/kt2069.kt +++ b/compiler/testData/diagnostics/tests/subtyping/kt2069.kt @@ -10,5 +10,5 @@ class T : T1 { super.foo() } - class object {} + default object {} } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/subtyping/kt2069.txt b/compiler/testData/diagnostics/tests/subtyping/kt2069.txt index d0695034829..6d967a2e5e7 100644 --- a/compiler/testData/diagnostics/tests/subtyping/kt2069.txt +++ b/compiler/testData/diagnostics/tests/subtyping/kt2069.txt @@ -10,7 +10,7 @@ package kt2069 { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.kt b/compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.kt index c0660e34d7e..2f40f38a4a2 100644 --- a/compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.kt +++ b/compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.kt @@ -1,6 +1,6 @@ class C { suppress("warnings") - class object { + default object { val foo: String?? = null as Nothing? } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.txt b/compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.txt index 7d8bdeae162..a001b81b159 100644 --- a/compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.txt +++ b/compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.txt @@ -6,7 +6,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - kotlin.suppress(names = {"warnings"}: kotlin.Array) internal class object Default { + kotlin.suppress(names = {"warnings"}: kotlin.Array) internal default object Default { private constructor Default() internal final val foo: kotlin.String? = null public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.kt b/compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.kt index 996a4c5df29..7d7aef9080b 100644 --- a/compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.kt +++ b/compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.kt @@ -1,6 +1,6 @@ class C { suppress("REDUNDANT_NULLABLE", "UNNECESSARY_NOT_NULL_ASSERTION") - class object { + default object { val foo: String?? = ""!! as String?? } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.txt b/compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.txt index 9e82e3a1601..21f44b3f9d2 100644 --- a/compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.txt +++ b/compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.txt @@ -6,7 +6,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - kotlin.suppress(names = {"REDUNDANT_NULLABLE", "UNNECESSARY_NOT_NULL_ASSERTION"}: kotlin.Array) internal class object Default { + kotlin.suppress(names = {"REDUNDANT_NULLABLE", "UNNECESSARY_NOT_NULL_ASSERTION"}: kotlin.Array) internal default object Default { private constructor Default() internal final val foo: kotlin.String? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.kt b/compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.kt index b2e80c66388..ba0844f6b98 100644 --- a/compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.kt +++ b/compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.kt @@ -1,6 +1,6 @@ class C { suppress("REDUNDANT_NULLABLE") - class object { + default object { val foo: String?? = null as Nothing?? } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.txt b/compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.txt index 60299997944..d8d78238293 100644 --- a/compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.txt +++ b/compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.txt @@ -6,7 +6,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - kotlin.suppress(names = {"REDUNDANT_NULLABLE"}: kotlin.Array) internal class object Default { + kotlin.suppress(names = {"REDUNDANT_NULLABLE"}: kotlin.Array) internal default object Default { private constructor Default() internal final val foo: kotlin.String? = null public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.kt b/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.kt index 1a30d20685b..866a159357a 100644 --- a/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.kt +++ b/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.kt @@ -27,7 +27,7 @@ class Test { t.apply(t.foo()) } - class object { + default object { fun test(t: Test) { t.apply(t.foo()) } diff --git a/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.txt b/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.txt index 69d7e21e44f..715d8f66bcb 100644 --- a/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.txt +++ b/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.txt @@ -14,7 +14,7 @@ internal final class Test { internal final fun test(/*0*/ t: Test): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.kt b/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.kt index 71f5b542e8c..c932acb8b05 100644 --- a/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.kt +++ b/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.kt @@ -26,7 +26,7 @@ class Test { t.apply(t.i) } - class object { + default object { fun test(t: Test) { t.apply(t.i) } diff --git a/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.txt b/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.txt index 2bda930ada8..e9df610f398 100644 --- a/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.txt +++ b/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.txt @@ -14,7 +14,7 @@ internal final class Test { internal final fun test(/*0*/ t: Test): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.kt b/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.kt index 7fbfbf8f1d0..bc7760358b2 100644 --- a/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.kt +++ b/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.kt @@ -26,7 +26,7 @@ class Test { t.i = getT() } - class object { + default object { fun test(t: Test) { t.i = getT() } diff --git a/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.txt b/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.txt index a1b45139d42..4f0ceeec74e 100644 --- a/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.txt +++ b/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.txt @@ -14,7 +14,7 @@ internal final class Test { internal final fun test(/*0*/ t: Test): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.kt index 9ab3a878f95..1c8bfc76571 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.kt @@ -11,7 +11,7 @@ class A { nativeGetter fun foo(a: Double): String? = null - class object { + default object { nativeGetter fun get(a: String): Any? = null @@ -31,7 +31,7 @@ class B { nativeGetter object Obj1 {} - class object { + default object { nativeGetter val foo = 0 @@ -66,7 +66,7 @@ class C { nativeGetter fun baz(a: String = "foo"): Int? = 0 - class object { + default object { nativeGetter fun Int.get(a: String): Int? = 1 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.txt index 53c2e6e23c4..6910b4e0f4c 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.txt @@ -9,7 +9,7 @@ kotlin.js.native() internal final class A { kotlin.js.nativeGetter() internal final fun take(/*0*/ a: kotlin.Number): kotlin.String? public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeGetter() internal final fun foo(/*0*/ a: kotlin.Double): kotlin.String? @@ -27,7 +27,7 @@ kotlin.js.native() internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() kotlin.js.nativeGetter() internal final val foo: kotlin.Int = 0 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -64,7 +64,7 @@ kotlin.js.native() internal final class C { kotlin.js.nativeGetter() internal final fun kotlin.Int.get2(/*0*/ a: kotlin.Number): kotlin.String? kotlin.js.nativeGetter() internal final fun kotlin.Int.get3(/*0*/ a: kotlin.Int): kotlin.String? - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.kt index bcc270a1d36..12c1b34af21 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.kt @@ -13,7 +13,7 @@ class A { nativeGetter fun foo(a: Double): String? = null - class object { + default object { nativeGetter fun get(a: String): Any? = null @@ -32,7 +32,7 @@ class A { nativeGetter object Obj1 {} - class object { + default object { nativeGetter val foo = 0 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.txt index 3ebf299235f..599822fcbec 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.txt @@ -22,7 +22,7 @@ kotlin.js.native() internal final class A { kotlin.js.nativeGetter() internal final fun take(/*0*/ a: kotlin.Number): kotlin.String? public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeGetter() internal final fun foo(/*0*/ a: kotlin.Double): kotlin.String? @@ -40,7 +40,7 @@ kotlin.js.native() internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() kotlin.js.nativeGetter() internal final val foo: kotlin.Int = 0 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt index acec0dc4e2a..3b666d140aa 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt @@ -12,7 +12,7 @@ class A { nativeGetter fun foo(a: Double): String? = null - class object { + default object { nativeGetter fun get(a: String): Any? = null @@ -40,7 +40,7 @@ class A { nativeGetter object Obj1 {} - class object { + default object { nativeGetter val foo = 0 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.txt index 01f776d76fd..781656c0639 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.txt @@ -22,7 +22,7 @@ internal final class A { kotlin.js.nativeGetter() internal final fun take(/*0*/ a: kotlin.Number): kotlin.String? public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeGetter() internal final fun foo(/*0*/ a: kotlin.Double): kotlin.String? @@ -43,7 +43,7 @@ internal final class A { kotlin.js.nativeGetter() internal final fun kotlin.Int.get2(/*0*/ a: kotlin.Number): kotlin.String? kotlin.js.nativeGetter() internal final fun kotlin.Int.get3(/*0*/ a: kotlin.Int): kotlin.String? - internal class object Default { + internal default object Default { private constructor Default() kotlin.js.nativeGetter() internal final val foo: kotlin.Int = 0 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.kt index 9bfd632091b..831902b66ce 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.kt @@ -10,7 +10,7 @@ class A { nativeGetter fun foo(a: Double): String? = null - class object { + default object { nativeGetter fun get(a: String): Any? = null @@ -29,7 +29,7 @@ class B { nativeGetter object Obj1 {} - class object { + default object { nativeGetter val foo = 0 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.txt index 2818c824c2b..6343aa6f369 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.txt @@ -9,7 +9,7 @@ internal final class A { kotlin.js.nativeGetter() internal final fun take(/*0*/ a: kotlin.Number): kotlin.String? public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeGetter() internal final fun foo(/*0*/ a: kotlin.Double): kotlin.String? @@ -27,7 +27,7 @@ internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() kotlin.js.nativeGetter() internal final val foo: kotlin.Int = 0 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.kt index 4d1b733ed32..cf35b74c24b 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.kt @@ -20,7 +20,7 @@ class A { nativeInvoke object Obj1 {} - class object { + default object { nativeInvoke fun foo() {} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.txt index 505a6b19e65..b0cd645b33f 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.txt @@ -11,7 +11,7 @@ kotlin.js.native() internal final class A { kotlin.js.nativeInvoke() internal final fun kotlin.Int.ext(): kotlin.Int kotlin.js.nativeInvoke() internal final fun kotlin.Int.invoke(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() kotlin.js.nativeInvoke() internal final val foo: kotlin.Int = 0 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.kt index a1bec617d93..fe626a59aff 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.kt @@ -31,7 +31,7 @@ class A { fun Int.invoke(a: String, b: Int) = "OK" } - class object { + default object { nativeInvoke fun foo() {} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.txt index 5089c6cbb4e..0f576ec3dfa 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.txt @@ -24,7 +24,7 @@ kotlin.js.native() internal final class A { kotlin.js.nativeInvoke() internal final fun kotlin.Int.invoke(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeInvoke() internal final fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt index 2fb818e52b3..a720572ad61 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt @@ -24,7 +24,7 @@ class A { fun invoke(a: String): Int = 0 } - class object { + default object { nativeInvoke fun foo() {} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.txt index d61294d7391..0e551bd0729 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.txt @@ -24,7 +24,7 @@ internal final class A { kotlin.js.nativeInvoke() internal final fun kotlin.Int.invoke(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeInvoke() internal final fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.kt index 3a8d6803139..39d48f47421 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.kt @@ -19,7 +19,7 @@ class A { nativeInvoke object Obj {} - class object { + default object { nativeInvoke fun foo() {} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.txt index 1728536ba56..ef24ed7b7ad 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.txt @@ -11,7 +11,7 @@ internal final class A { kotlin.js.nativeInvoke() internal final fun kotlin.Int.ext(): kotlin.Int kotlin.js.nativeInvoke() internal final fun kotlin.Int.invoke(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeInvoke() internal final fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.kt index c6a532c28cd..b124a4eda81 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.kt @@ -17,7 +17,7 @@ class A { nativeSetter fun set5(a: Double, v: String): CharSequence = "OK" - class object { + default object { nativeSetter fun set(a: String, v: Any?): Any? = null @@ -43,7 +43,7 @@ class B { nativeSetter object Obj1 {} - class object { + default object { nativeSetter val foo = 0 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.txt index d7bab616bea..334201407d8 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.txt @@ -11,7 +11,7 @@ kotlin.js.native() internal final class A { kotlin.js.nativeSetter() internal final fun set5(/*0*/ a: kotlin.Double, /*1*/ v: kotlin.String): kotlin.CharSequence public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeSetter() internal final fun foo(/*0*/ a: kotlin.Int, /*1*/ v: kotlin.String): kotlin.Unit @@ -31,7 +31,7 @@ kotlin.js.native() internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() kotlin.js.nativeSetter() internal final val foo: kotlin.Int = 0 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.kt index 3c5ddfafc9e..41e15645605 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.kt @@ -19,7 +19,7 @@ class A { nativeSetter fun set5(a: Double, v: String): CharSequence = "OK" - class object { + default object { nativeSetter fun set(a: String, v: Any?): Any? = null @@ -44,7 +44,7 @@ class A { nativeSetter object Obj1 {} - class object { + default object { nativeSetter val foo = 0 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.txt index 2685b99dfed..3ce2b2873d4 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.txt @@ -24,7 +24,7 @@ kotlin.js.native() internal final class A { kotlin.js.nativeSetter() internal final fun set5(/*0*/ a: kotlin.Double, /*1*/ v: kotlin.String): kotlin.CharSequence public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeSetter() internal final fun foo(/*0*/ a: kotlin.Int, /*1*/ v: kotlin.String): kotlin.Unit @@ -44,7 +44,7 @@ kotlin.js.native() internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() kotlin.js.nativeSetter() internal final val foo: kotlin.Int = 0 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt index a5dd9690c45..44757509d4b 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt @@ -18,7 +18,7 @@ class A { nativeSetter fun set5(a: Double, v: String): CharSequence = "OK" - class object { + default object { nativeSetter fun set(a: String, v: Any?): Any? = null @@ -37,7 +37,7 @@ class A { nativeSetter object Obj1 {} - class object { + default object { nativeSetter val foo = 0 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.txt index 264be8b75b2..e667bf55991 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.txt @@ -24,7 +24,7 @@ internal final class A { kotlin.js.nativeSetter() internal final fun set5(/*0*/ a: kotlin.Double, /*1*/ v: kotlin.String): kotlin.CharSequence public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeSetter() internal final fun foo(/*0*/ a: kotlin.Int, /*1*/ v: kotlin.String): kotlin.Unit @@ -42,7 +42,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() kotlin.js.nativeSetter() internal final val foo: kotlin.Int = 0 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.kt index c78bdccf915..470df316389 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.kt @@ -10,7 +10,7 @@ class A { nativeSetter fun foo(a: Int, v: String) {} - class object { + default object { nativeSetter fun set(a: String, v: Any?): Any? = null @@ -29,7 +29,7 @@ class B { nativeSetter object Obj1 {} - class object { + default object { nativeSetter val foo = 0 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.txt index 51c8cd72f3a..d4aeca6826d 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.txt @@ -9,7 +9,7 @@ internal final class A { kotlin.js.nativeSetter() internal final fun set(/*0*/ a: kotlin.String, /*1*/ v: kotlin.Any?): kotlin.Any? public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.js.nativeSetter() internal final fun foo(/*0*/ a: kotlin.Int, /*1*/ v: kotlin.String): kotlin.Unit @@ -27,7 +27,7 @@ internal final class B { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() kotlin.js.nativeSetter() internal final val foo: kotlin.Int = 0 public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt index 931d7883fd8..25355708844 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt @@ -23,7 +23,7 @@ trait T { fun foo() fun bar() {} - class object { + default object { val baz: Int val boo: Int = noImpl @@ -40,7 +40,7 @@ class C { fun foo() fun bar() {} - class object { + default object { val baz: Int val boo: Int = noImpl diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.txt b/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.txt index ce483778ca3..d8e2667d7fa 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.txt @@ -19,7 +19,7 @@ kotlin.js.native() internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val baz: kotlin.Int internal final val boo: kotlin.Int @@ -50,7 +50,7 @@ kotlin.js.native() internal trait T { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() internal final val baz: kotlin.Int internal final val boo: kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.kt index 0c567f36728..ff7e4e26ed1 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.kt @@ -4,7 +4,7 @@ annotation class AnnClass(val a: Class<*>) class MyClass { - AnnClass(javaClass()) class object { + AnnClass(javaClass()) default object { } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.txt index dc733fd766b..25fa856277e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.txt @@ -16,7 +16,7 @@ package test { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - test.AnnClass(a = test.MyClass.class: java.lang.Class) internal class object Default { + test.AnnClass(a = test.MyClass.class: java.lang.Class) internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.kt index c569ddb3ac1..e62c94f2c65 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.kt @@ -2,7 +2,7 @@ import kotlin.platform.platformStatic class A { - class object { + default object { platformStatic fun a1() { } @@ -28,7 +28,7 @@ class A { } trait B { - class object { + default object { platformStatic fun a1() { } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.txt index a4e964692e3..bcffbc31c4f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/functions.txt @@ -16,7 +16,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() kotlin.platform.platformStatic() internal final fun a1(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -40,7 +40,7 @@ internal trait B { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default { + internal default object Default { private constructor Default() kotlin.platform.platformStatic() internal final fun a1(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/property.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/property.kt index 8813a3a485f..5d9b7c8e319 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/property.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/property.kt @@ -7,7 +7,7 @@ open class B { } class A { - class object : B() { + default object : B() { var p1:Int = 1 [platformStatic] set(p: Int) { p1 = 1 diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/property.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/property.txt index 6148aad1b49..97e282acede 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/property.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/property.txt @@ -20,7 +20,7 @@ internal final class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } - internal class object Default : B { + internal default object Default : B { private constructor Default() kotlin.platform.platformStatic() public open override /*1*/ val base1: kotlin.Int = 0 public open override /*1*/ val base2: kotlin.Int = 0 diff --git a/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/innerConstructorFromClass.kt b/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/innerConstructorFromClass.kt index 229f673e166..5fa427a2dd8 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/innerConstructorFromClass.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/innerConstructorFromClass.kt @@ -12,7 +12,7 @@ class A { y : KMemberFunction0 } - class object { + default object { fun main() { ::Inner val y = A::Inner diff --git a/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/innerConstructorFromClass.txt b/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/innerConstructorFromClass.txt index e1000d574bb..af5ca8ddb0a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/innerConstructorFromClass.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/innerConstructorFromClass.txt @@ -7,7 +7,7 @@ internal final class A { internal final fun main(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/nestedConstructorFromClass.kt b/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/nestedConstructorFromClass.kt index 2884dfa3d30..8279eeb0cf6 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/nestedConstructorFromClass.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/nestedConstructorFromClass.kt @@ -12,7 +12,7 @@ class A { y : KFunction0 } - class object { + default object { fun main() { ::Nested val y = A::Nested diff --git a/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/nestedConstructorFromClass.txt b/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/nestedConstructorFromClass.txt index 286481e3000..a6be1f3d3d2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/nestedConstructorFromClass.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/callableReference/function/nestedConstructorFromClass.txt @@ -7,7 +7,7 @@ internal final class A { internal final fun main(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/platformStaticInClassObject.kt b/compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/platformStaticInClassObject.kt index 220d041b6b5..40ff1c348eb 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/platformStaticInClassObject.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/platformStaticInClassObject.kt @@ -5,7 +5,7 @@ open class Base { } class Derived : Base() { - class object { + default object { platformStatic fun foo() {} } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/platformStaticInClassObject.txt b/compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/platformStaticInClassObject.txt index f4b2fdeb2d7..1a06a86eda4 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/platformStaticInClassObject.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/platformStaticInClassObject.txt @@ -15,7 +15,7 @@ internal final class Derived : Base { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.platform.platformStatic() internal final fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithStdLib/native/body.kt b/compiler/testData/diagnostics/testsWithStdLib/native/body.kt index c68c023d6ed..3646a355181 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/native/body.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/native/body.kt @@ -5,7 +5,7 @@ import kotlin.jvm.* class C { native fun foo() {} - class object { + default object { native fun foo() {} } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/native/body.txt b/compiler/testData/diagnostics/testsWithStdLib/native/body.txt index 35fd0e2228b..f5c66fa3f74 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/native/body.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/native/body.txt @@ -10,7 +10,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.jvm.native() internal final fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithStdLib/native/noBody.kt b/compiler/testData/diagnostics/testsWithStdLib/native/noBody.kt index 5b8c51d595b..f45c28d0d10 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/native/noBody.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/native/noBody.kt @@ -5,7 +5,7 @@ native fun foo() class C { native fun foo() - class object { + default object { native fun foo() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/native/noBody.txt b/compiler/testData/diagnostics/testsWithStdLib/native/noBody.txt index 35fd0e2228b..f5c66fa3f74 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/native/noBody.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/native/noBody.txt @@ -10,7 +10,7 @@ internal final class C { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean kotlin.jvm.native() internal final fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithStdLib/native/trait.kt b/compiler/testData/diagnostics/testsWithStdLib/native/trait.kt index d3efb5f1c46..7d31ebe9e72 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/native/trait.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/native/trait.kt @@ -4,7 +4,7 @@ trait Tr { native fun foo() native fun bar() {} - class object { + default object { native fun foo() native fun bar() {} } diff --git a/compiler/testData/diagnostics/testsWithStdLib/native/trait.txt b/compiler/testData/diagnostics/testsWithStdLib/native/trait.txt index 864dd5d39a2..c675af28bd4 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/native/trait.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/native/trait.txt @@ -7,7 +7,7 @@ internal trait Tr { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal class object Default { + internal default object Default { private constructor Default() kotlin.jvm.native() internal final fun bar(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/testData/evaluate/constant/classObjectProperty.kt b/compiler/testData/evaluate/constant/classObjectProperty.kt index 3dd9882da19..7293ef31c7a 100644 --- a/compiler/testData/evaluate/constant/classObjectProperty.kt +++ b/compiler/testData/evaluate/constant/classObjectProperty.kt @@ -13,7 +13,7 @@ class A { // val prop4: 2 val prop4 = A.a + 1 - class object { + default object { val a = 1 } } diff --git a/compiler/testData/lineNumber/classObject.kt b/compiler/testData/lineNumber/classObject.kt index ec42ee5dbf2..dab1676bfe2 100644 --- a/compiler/testData/lineNumber/classObject.kt +++ b/compiler/testData/lineNumber/classObject.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { val prop = test.lineNumber() fun foo(): Int { diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt index 3de58cb7e6a..669a5110394 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt @@ -3,7 +3,7 @@ package test annotation class Anno class Class { - class object { + default object { [Anno] var property: Int = 42 } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.txt index 99b357e21c4..828525abbf2 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.txt @@ -7,7 +7,7 @@ internal final annotation class Anno : kotlin.Annotation { internal final class Class { /*primary*/ public constructor Class() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() test.Anno() internal final var property: kotlin.Int internal final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt index 876adc9919c..b2d30c6f1d2 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt @@ -1,7 +1,7 @@ package test class A { - class object { + default object { annotation class Anno1 class B { diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.txt index 8b93de1706e..5df4dfc04e5 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.txt @@ -3,7 +3,7 @@ package test internal final class A { /*primary*/ public constructor A() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal final annotation class Anno1 : kotlin.Annotation { diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt index 05b356a6050..2aa7b90e3a0 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt @@ -3,7 +3,7 @@ package test annotation class Anno class Class { - class object { + default object { Anno class Nested } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.txt index 3606dda64f0..f12fc3065ff 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.txt @@ -7,7 +7,7 @@ internal final annotation class Anno : kotlin.Annotation { internal final class Class { /*primary*/ public constructor Class() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() test.Anno() internal final class Nested { diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt index 009df0d3482..147a5c26ee7 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt @@ -3,5 +3,5 @@ package test annotation class Anno class Class { - Anno class object + Anno default object } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.txt index db19bec1105..8a75c745461 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.txt @@ -7,7 +7,7 @@ internal final annotation class Anno : kotlin.Annotation { internal final class Class { /*primary*/ public constructor Class() - test.Anno() internal class object Default { + test.Anno() internal default object Default { /*primary*/ private constructor Default() } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt index 529829ab581..a23c1cad869 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt @@ -3,7 +3,7 @@ package test class A { class B { - class object { + default object { val TEST = 1 } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.txt index 342727eb693..2b62f505d81 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.txt @@ -6,7 +6,7 @@ internal final class A { internal final class B { /*primary*/ public constructor B() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal final val TEST: kotlin.Int = 1 internal final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt index cd52b3be67d..8fb85209ab1 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt @@ -6,5 +6,5 @@ deprecated("Class") class Class { deprecated("Inner") inner class Inner - deprecated("class object") class object + deprecated("default object") default object } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.txt index c624b95ae42..91f36755925 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.txt @@ -3,7 +3,7 @@ package test kotlin.deprecated(value = "Class": kotlin.String) internal final class Class { /*primary*/ public constructor Class() - kotlin.deprecated(value = "class object": kotlin.String) internal class object Default { + kotlin.deprecated(value = "default object": kotlin.String) internal default object Default { /*primary*/ private constructor Default() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt index 2ae6f00b765..51b5f3010d3 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt @@ -10,5 +10,5 @@ Anno(ElementType.METHOD) class Class { Anno(ElementType.TYPE) class Nested - Anno(ElementType.ANNOTATION_TYPE) class object + Anno(ElementType.ANNOTATION_TYPE) default object } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.txt index f2ebcc7d05a..3f5863313f0 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.txt @@ -9,7 +9,7 @@ internal final annotation class Anno : kotlin.Annotation { test.Anno(t = ElementType.METHOD: java.lang.annotation.ElementType) internal final class Class { /*primary*/ public constructor Class() - test.Anno(t = ElementType.ANNOTATION_TYPE: java.lang.annotation.ElementType) internal class object Default { + test.Anno(t = ElementType.ANNOTATION_TYPE: java.lang.annotation.ElementType) internal default object Default { /*primary*/ private constructor Default() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt index 467f446b84d..ab001e21ed5 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt @@ -3,7 +3,7 @@ package test annotation class Anno class Class { - class object { + default object { [Anno] val property: Int get() = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.txt index d25ed2806b4..fee5273bef9 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.txt @@ -7,7 +7,7 @@ internal final annotation class Anno : kotlin.Annotation { internal final class Class { /*primary*/ public constructor Class() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() test.Anno() internal final val property: kotlin.Int internal final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt index 4cdc0a48063..3ad4958d35d 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt @@ -3,7 +3,7 @@ package test annotation class Anno trait Trait { - class object { + default object { [Anno] val property: Int get() = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.txt b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.txt index 9169e3211a8..b57cd3f65f7 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.txt @@ -6,7 +6,7 @@ internal final annotation class Anno : kotlin.Annotation { internal trait Trait { - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() test.Anno() internal final val property: kotlin.Int internal final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt index 9edb63cc294..11f94904c20 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt @@ -2,7 +2,7 @@ package test class ConstructorTypeParamClassObjectTypeConflict { - class object { + default object { trait test } @@ -10,7 +10,7 @@ class ConstructorTypeParamClassObjectTypeConflict { } class ConstructorTypeParamClassObjectConflict { - class object { + default object { val test = 12 } @@ -18,7 +18,7 @@ class ConstructorTypeParamClassObjectConflict { } class TestConstructorParamClassObjectConflict(test: String) { - class object { + default object { val test = 12 } @@ -27,7 +27,7 @@ class TestConstructorParamClassObjectConflict(test: String) { class TestConstructorValClassObjectConflict(val test: String) { - class object { + default object { val test = 12 } @@ -35,7 +35,7 @@ class TestConstructorValClassObjectConflict(val test: String) { } class TestClassObjectAndClassConflict { - class object { + default object { val bla = 12 } diff --git a/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.txt b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.txt index 162024e389e..a8c5aeb86d7 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.txt +++ b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.txt @@ -5,7 +5,7 @@ internal final class ConstructorTypeParamClassObjectConflict { internal final val some: kotlin.Int = 12 internal final fun (): kotlin.Int - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal final val test: kotlin.Int = 12 internal final fun (): kotlin.Int @@ -17,7 +17,7 @@ internal final class ConstructorTypeParamClassObjectTypeConflict { internal final val some: test? internal final fun (): test? - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal trait test { @@ -32,7 +32,7 @@ internal final class TestClassObjectAndClassConflict { internal final val some: kotlin.String = "More" internal final fun (): kotlin.String - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal final val bla: kotlin.Int = 12 internal final fun (): kotlin.Int @@ -44,7 +44,7 @@ internal final class TestConstructorParamClassObjectConflict { internal final val some: kotlin.String internal final fun (): kotlin.String - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal final val test: kotlin.Int = 12 internal final fun (): kotlin.Int @@ -58,7 +58,7 @@ internal final class TestConstructorValClassObjectConflict { internal final val test: kotlin.String internal final fun (): kotlin.String - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal final val test: kotlin.Int = 12 internal final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt b/compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt index a0142ef48fd..c2752d45ff8 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt @@ -2,7 +2,7 @@ package test public class Outer { - public class object { + public default object { public object Obj { public val v: String = "val" public fun f(): String = "fun" diff --git a/compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.txt b/compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.txt index 6e718bec2c3..81144403ba0 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.txt @@ -3,7 +3,7 @@ package test public final class Outer { /*primary*/ public constructor Outer() - public class object Default { + public default object Default { /*primary*/ private constructor Default() public object Obj { diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt index dc1df2d75ff..45deb1bd0cf 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt @@ -2,7 +2,7 @@ package test class ClassObjectDeclaresProperty { - class object { + default object { val i = 1 } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.txt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.txt index 554df488275..44732c22346 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.txt @@ -3,7 +3,7 @@ package test internal final class ClassObjectDeclaresProperty { /*primary*/ public constructor ClassObjectDeclaresProperty() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal final val i: kotlin.Int = 1 internal final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt index 1be3c10aa86..b3846d19650 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt @@ -2,7 +2,7 @@ package test class ClassObjectDeclaresProperty { - class object { + default object { var s = "" } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.txt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.txt index c09e90589f8..2ac02ab7989 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.txt @@ -3,7 +3,7 @@ package test internal final class ClassObjectDeclaresProperty { /*primary*/ public constructor ClassObjectDeclaresProperty() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal final var s: kotlin.String internal final fun (): kotlin.String diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt index 8d8b4600196..2e0a0329081 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt @@ -1,14 +1,14 @@ package test public class Pub { - class object {} + default object {} } private class Pri { - class object {} + default object {} } class Int { - class object {} + default object {} } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.txt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.txt index 19f94ea7c50..e622bd681c2 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.txt @@ -3,7 +3,7 @@ package test internal final class Int { /*primary*/ public constructor Int() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() } } @@ -11,7 +11,7 @@ internal final class Int { private final class Pri { /*primary*/ public constructor Pri() - private class object Default { + private default object Default { /*primary*/ private constructor Default() } } @@ -19,7 +19,7 @@ private final class Pri { public final class Pub { /*primary*/ public constructor Pub() - public class object Default { + public default object Default { /*primary*/ private constructor Default() } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt index d54a0129f17..20efdff3fcf 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt @@ -1,37 +1,37 @@ package test public class PubPri { - private class object {} + private default object {} } public class PubInt { - internal class object {} + internal default object {} } public class PubPub { - public class object {} + public default object {} } internal class IntPri { - private class object {} + private default object {} } internal class IntInt { - internal class object {} + internal default object {} } internal class IntPub { - public class object {} + public default object {} } private class PriPri { - private class object {} + private default object {} } private class PriInt { - internal class object {} + internal default object {} } private class PriPub { - public class object {} + public default object {} } \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.txt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.txt index 7a1a528456a..7b5444d8069 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.txt @@ -3,7 +3,7 @@ package test internal final class IntInt { /*primary*/ public constructor IntInt() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() } } @@ -11,7 +11,7 @@ internal final class IntInt { internal final class IntPri { /*primary*/ public constructor IntPri() - private class object Default { + private default object Default { /*primary*/ private constructor Default() } } @@ -19,7 +19,7 @@ internal final class IntPri { internal final class IntPub { /*primary*/ public constructor IntPub() - public class object Default { + public default object Default { /*primary*/ private constructor Default() } } @@ -27,7 +27,7 @@ internal final class IntPub { private final class PriInt { /*primary*/ public constructor PriInt() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() } } @@ -35,7 +35,7 @@ private final class PriInt { private final class PriPri { /*primary*/ public constructor PriPri() - private class object Default { + private default object Default { /*primary*/ private constructor Default() } } @@ -43,7 +43,7 @@ private final class PriPri { private final class PriPub { /*primary*/ public constructor PriPub() - public class object Default { + public default object Default { /*primary*/ private constructor Default() } } @@ -51,7 +51,7 @@ private final class PriPub { public final class PubInt { /*primary*/ public constructor PubInt() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() } } @@ -59,7 +59,7 @@ public final class PubInt { public final class PubPri { /*primary*/ public constructor PubPri() - private class object Default { + private default object Default { /*primary*/ private constructor Default() } } @@ -67,7 +67,7 @@ public final class PubPri { public final class PubPub { /*primary*/ public constructor PubPub() - public class object Default { + public default object Default { /*primary*/ private constructor Default() } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt index dcdcaa91e49..991734ce43e 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt @@ -3,6 +3,6 @@ package test trait Bbb class ClassObjectextendsTrait { - class object : Bbb { + default object : Bbb { } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.txt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.txt index baad9dc9d4e..3e1a6f29bce 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.txt @@ -6,7 +6,7 @@ internal trait Bbb { internal final class ClassObjectextendsTrait { /*primary*/ public constructor ClassObjectextendsTrait() - internal class object Default : test.Bbb { + internal default object Default : test.Bbb { /*primary*/ private constructor Default() } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt index c81c15fec2c..5517c42d6eb 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt @@ -3,6 +3,6 @@ package test trait Bbb

class ClassObjectExtendsTraitWithTP { - class object : Bbb { + default object : Bbb { } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.txt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.txt index a6402ecf4be..cb1ea473f82 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.txt @@ -6,7 +6,7 @@ internal trait Bbb { internal final class ClassObjectExtendsTraitWithTP { /*primary*/ public constructor ClassObjectExtendsTraitWithTP() - internal class object Default : test.Bbb { + internal default object Default : test.Bbb { /*primary*/ private constructor Default() } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt index 9901eb874fb..3f114948cac 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt @@ -2,7 +2,7 @@ package test class A { - class object { + default object { val some = 1 } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.txt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.txt index 7cbc425b62f..ec369bdda36 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.txt @@ -5,7 +5,7 @@ internal final class A { internal final val other: kotlin.Int = 1 internal final fun (): kotlin.Int - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal final val some: kotlin.Int = 1 internal final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt b/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt index a55c7cd57d1..8a2d87c1213 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt @@ -7,5 +7,5 @@ trait T { class A : T { override fun foo(): Int = 42 - class object : T by A() + default object : T by A() } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.txt b/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.txt index 3993e3f72e1..ec091e0f524 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/Delegation.txt @@ -4,7 +4,7 @@ internal final class A : test.T { /*primary*/ public constructor A() internal open override /*1*/ fun foo(): kotlin.Int - internal class object Default : test.T { + internal default object Default : test.T { /*primary*/ private constructor Default() internal open override /*1*/ /*delegation*/ fun foo(): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt b/compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt index d0a6553b0dd..cb68ff12326 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt @@ -2,7 +2,7 @@ package test class TestFirst { - class object { + default object { fun testing(a: InnerClass) = 45 fun testing(a: NotInnerClass) = 45 } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.txt b/compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.txt index 346f5e68685..dce1711ea63 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.txt @@ -3,7 +3,7 @@ package test internal final class TestFirst { /*primary*/ public constructor TestFirst() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() internal final fun testing(/*0*/ a: test.TestFirst.InnerClass): kotlin.Int internal final fun testing(/*0*/ a: test.TestFirst.NotInnerClass): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt b/compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt index 05ac1e5fd08..b5bcbabf0a6 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt @@ -1,7 +1,7 @@ package test class NamedClassObject { - class object Named { + default object Named { fun f(): Int = 1 } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.txt b/compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.txt index d8303a9fc62..d2a5e178f0b 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.txt @@ -3,7 +3,7 @@ package test internal final class NamedClassObject { /*primary*/ public constructor NamedClassObject() - internal class object Named { + internal default object Named { /*primary*/ private constructor Named() internal final fun f(): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt b/compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt index dcbab40afd8..4be3e48a1a3 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt @@ -1,6 +1,6 @@ package test class SimpleClassObject() { - class object { + default object { } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.txt b/compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.txt index 1a034b54947..b1880422d48 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.txt @@ -3,7 +3,7 @@ package test internal final class SimpleClassObject { /*primary*/ public constructor SimpleClassObject() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt index 98816f047ce..481451719b9 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt @@ -3,7 +3,7 @@ package test class Test { - class object { + default object { public val prop1 : Int = 10 diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.txt b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.txt index d7a568bd702..474b32086bf 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.txt @@ -3,7 +3,7 @@ package test internal final class Test { /*primary*/ public constructor Test() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() public final val prop1: kotlin.Int = 10 public final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt index f616b86c48d..b62e26e6969 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt @@ -3,7 +3,7 @@ package test trait Test { - class object { + default object { public val prop1 : Int = 10 diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.txt b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.txt index ce75f0a9815..f4b6c2dd8c5 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.txt @@ -2,7 +2,7 @@ package test internal trait Test { - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() public final val prop1: kotlin.Int = 10 public final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt b/compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt index e7ace469ff6..37c529e2634 100644 --- a/compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt @@ -1,7 +1,7 @@ package test class A { - class object { } + default object { } enum class E { ENTRY } diff --git a/compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.txt b/compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.txt index 988e86d67df..e3a078f43f3 100644 --- a/compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.txt @@ -3,7 +3,7 @@ package test internal final class A { /*primary*/ public constructor A() - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt index 3f0f1de5846..38ce1c3ca04 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt @@ -1,6 +1,6 @@ package test trait TheTrait { - class object { + default object { } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.txt index dc4d3ff7a2c..40e2fb05269 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.txt @@ -2,7 +2,7 @@ package test internal trait TheTrait { - internal class object Default { + internal default object Default { /*primary*/ private constructor Default() } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt index 8d7a3e524a5..729e11da295 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt @@ -1,7 +1,7 @@ package test class Some { - TestAnnotation class object { + TestAnnotation default object { annotation class TestAnnotation } } diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.txt index 2dfae0b1d83..e826bd45301 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.txt @@ -3,7 +3,7 @@ package test internal final class Some { /*primary*/ public constructor Some() - test.Some.Default.TestAnnotation() internal class object Default { + test.Some.Default.TestAnnotation() internal default object Default { /*primary*/ private constructor Default() internal final annotation class TestAnnotation : kotlin.Annotation { diff --git a/compiler/testData/psi/ByClauses.kt b/compiler/testData/psi/ByClauses.kt index 05d1cbfef4a..deded280bb8 100644 --- a/compiler/testData/psi/ByClauses.kt +++ b/compiler/testData/psi/ByClauses.kt @@ -1,23 +1,23 @@ class A : b by a { - class object {} + default object {} } class A : b by a + b() * 5 { - class object {} + default object {} } class A : b by (a) { - class object {} + default object {} } class A : b by (a {}) { - class object {} + default object {} } class A : b by a[a {}] { - class object {} + default object {} } class A : b by a(a {}) { - class object {} + default object {} } class A : b by object { fun f() = a {} } { - class object {} + default object {} } \ No newline at end of file diff --git a/compiler/testData/psi/ByClauses.txt b/compiler/testData/psi/ByClauses.txt index f0878551e30..64f67937ab0 100644 --- a/compiler/testData/psi/ByClauses.txt +++ b/compiler/testData/psi/ByClauses.txt @@ -24,7 +24,8 @@ JetFile: ByClauses.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -75,7 +76,8 @@ JetFile: ByClauses.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -111,7 +113,8 @@ JetFile: ByClauses.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -156,7 +159,8 @@ JetFile: ByClauses.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -204,7 +208,8 @@ JetFile: ByClauses.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -253,7 +258,8 @@ JetFile: ByClauses.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -314,7 +320,8 @@ JetFile: ByClauses.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/CommentsBinding.kt b/compiler/testData/psi/CommentsBinding.kt index 14c249a1b79..6a5a28656be 100644 --- a/compiler/testData/psi/CommentsBinding.kt +++ b/compiler/testData/psi/CommentsBinding.kt @@ -41,9 +41,9 @@ class D { foo() // statement } // end of foo - // class object - class object { - } // end of class object + // default object + default object { + } // end of default object } // This is v diff --git a/compiler/testData/psi/CommentsBinding.txt b/compiler/testData/psi/CommentsBinding.txt index 01942c4d6b7..4ed6b672ab2 100644 --- a/compiler/testData/psi/CommentsBinding.txt +++ b/compiler/testData/psi/CommentsBinding.txt @@ -264,9 +264,10 @@ JetFile: CommentsBinding.kt PsiComment(EOL_COMMENT)('// end of foo') PsiWhiteSpace('\n\n ') OBJECT_DECLARATION - PsiComment(EOL_COMMENT)('// class object') + PsiComment(EOL_COMMENT)('// default object') PsiWhiteSpace('\n ') - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -275,7 +276,7 @@ JetFile: CommentsBinding.kt PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace(' ') - PsiComment(EOL_COMMENT)('// end of class object') + PsiComment(EOL_COMMENT)('// end of default object') PsiWhiteSpace('\n') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') diff --git a/compiler/testData/psi/NamedClassObject.kt b/compiler/testData/psi/NamedClassObject.kt index 83bfa32b495..52d771c2d74 100644 --- a/compiler/testData/psi/NamedClassObject.kt +++ b/compiler/testData/psi/NamedClassObject.kt @@ -1,11 +1,11 @@ class A { - class object Default + default object Default - class object B + default object B - class object C {} + default object C {} - class object + default object object C } diff --git a/compiler/testData/psi/NamedClassObject.txt b/compiler/testData/psi/NamedClassObject.txt index af921635c93..7c4b1bcb263 100644 --- a/compiler/testData/psi/NamedClassObject.txt +++ b/compiler/testData/psi/NamedClassObject.txt @@ -10,7 +10,8 @@ JetFile: NamedClassObject.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -18,7 +19,8 @@ JetFile: NamedClassObject.kt PsiElement(IDENTIFIER)('Default') PsiWhiteSpace('\n\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -26,7 +28,8 @@ JetFile: NamedClassObject.kt PsiElement(IDENTIFIER)('B') PsiWhiteSpace('\n\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -38,7 +41,8 @@ JetFile: NamedClassObject.kt PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace('\n\n ') diff --git a/compiler/testData/psi/SimpleClassMembers.kt b/compiler/testData/psi/SimpleClassMembers.kt index 2dc287da009..80314a0b44d 100644 --- a/compiler/testData/psi/SimpleClassMembers.kt +++ b/compiler/testData/psi/SimpleClassMembers.kt @@ -19,23 +19,23 @@ class foo { class Bar { object foo { - class object { + default object { } - private class object { + private default object { } - private class object : Fooo { + private default object : Fooo { } - private class object : Fooo, Bar by foo { + private default object : Fooo, Bar by foo { } - private class object : Fooo, Bar by foo, Goo() + private default object : Fooo, Bar by foo, Goo() } class Bar {} @@ -58,23 +58,23 @@ class foo { typealias foo = bar - class object { + default object { } - private class object { + private default object { } - private class object : Fooo { + private default object : Fooo { } - private class object : Fooo, Bar by foo { + private default object : Fooo, Bar by foo { } - private class object : Fooo, Bar by foo, Goo() + private default object : Fooo, Bar by foo, Goo() } diff --git a/compiler/testData/psi/SimpleClassMembers.txt b/compiler/testData/psi/SimpleClassMembers.txt index 48feec4e33f..e150ffcf9ef 100644 --- a/compiler/testData/psi/SimpleClassMembers.txt +++ b/compiler/testData/psi/SimpleClassMembers.txt @@ -87,7 +87,8 @@ JetFile: SimpleClassMembers.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -99,8 +100,8 @@ JetFile: SimpleClassMembers.kt OBJECT_DECLARATION MODIFIER_LIST PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -112,8 +113,8 @@ JetFile: SimpleClassMembers.kt OBJECT_DECLARATION MODIFIER_LIST PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -134,8 +135,8 @@ JetFile: SimpleClassMembers.kt OBJECT_DECLARATION MODIFIER_LIST PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -168,8 +169,8 @@ JetFile: SimpleClassMembers.kt OBJECT_DECLARATION MODIFIER_LIST PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -279,7 +280,8 @@ JetFile: SimpleClassMembers.kt PsiElement(IDENTIFIER)('bar') PsiWhiteSpace('\n\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -291,8 +293,8 @@ JetFile: SimpleClassMembers.kt OBJECT_DECLARATION MODIFIER_LIST PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -304,8 +306,8 @@ JetFile: SimpleClassMembers.kt OBJECT_DECLARATION MODIFIER_LIST PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -326,8 +328,8 @@ JetFile: SimpleClassMembers.kt OBJECT_DECLARATION MODIFIER_LIST PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') @@ -360,8 +362,8 @@ JetFile: SimpleClassMembers.kt OBJECT_DECLARATION MODIFIER_LIST PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/annotation/ShortAnnotations.kt b/compiler/testData/psi/annotation/ShortAnnotations.kt index 9c66904ab52..844f976206b 100644 --- a/compiler/testData/psi/annotation/ShortAnnotations.kt +++ b/compiler/testData/psi/annotation/ShortAnnotations.kt @@ -9,7 +9,7 @@ foo bar(1) buzz(1) zoo typealias T = Int class Foo { - foo bar(1) buzz(1) zoo class object {} + foo bar(1) buzz(1) zoo default object {} foo bar(1) buzz(1) zoo class A foo bar(1) buzz(1) zoo object B foo bar(1) buzz(1) zoo fun a() {} diff --git a/compiler/testData/psi/annotation/ShortAnnotations.txt b/compiler/testData/psi/annotation/ShortAnnotations.txt index c5c38b47136..21e97e362d4 100644 --- a/compiler/testData/psi/annotation/ShortAnnotations.txt +++ b/compiler/testData/psi/annotation/ShortAnnotations.txt @@ -474,8 +474,8 @@ JetFile: ShortAnnotations.kt USER_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('zoo') - PsiWhiteSpace(' ') - PsiElement(class)('class') + PsiWhiteSpace(' ') + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/PolymorphicClassObjects.kt b/compiler/testData/psi/examples/PolymorphicClassObjects.kt index 12027ad1994..52fee9ff0ec 100644 --- a/compiler/testData/psi/examples/PolymorphicClassObjects.kt +++ b/compiler/testData/psi/examples/PolymorphicClassObjects.kt @@ -9,7 +9,7 @@ open class Buildable { class List { - class object : Buildable { + default object : Buildable { override fun newBuilder() : Builder } diff --git a/compiler/testData/psi/examples/PolymorphicClassObjects.txt b/compiler/testData/psi/examples/PolymorphicClassObjects.txt index 74699f006b3..a13b5550775 100644 --- a/compiler/testData/psi/examples/PolymorphicClassObjects.txt +++ b/compiler/testData/psi/examples/PolymorphicClassObjects.txt @@ -132,7 +132,8 @@ JetFile: PolymorphicClassObjects.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/examples/UpdateOperation.kt b/compiler/testData/psi/examples/UpdateOperation.kt index 3388b6a8fac..a6d65965684 100644 --- a/compiler/testData/psi/examples/UpdateOperation.kt +++ b/compiler/testData/psi/examples/UpdateOperation.kt @@ -1,5 +1,5 @@ class Pair(x : Int, y : Int) { - class object { + default object { fun copy(from : Pair, x : Int = from.x, y : Int = from.y) = Pair(x, y) } } diff --git a/compiler/testData/psi/examples/UpdateOperation.txt b/compiler/testData/psi/examples/UpdateOperation.txt index 05630e6f3a8..a28b6207fe5 100644 --- a/compiler/testData/psi/examples/UpdateOperation.txt +++ b/compiler/testData/psi/examples/UpdateOperation.txt @@ -33,7 +33,8 @@ JetFile: UpdateOperation.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/recovery/kt2172.kt b/compiler/testData/psi/recovery/kt2172.kt index 2aca156f64f..7a5c60d2d3d 100644 --- a/compiler/testData/psi/recovery/kt2172.kt +++ b/compiler/testData/psi/recovery/kt2172.kt @@ -1,6 +1,6 @@ class Foo { - class object { + default object { val } } \ No newline at end of file diff --git a/compiler/testData/psi/recovery/kt2172.txt b/compiler/testData/psi/recovery/kt2172.txt index c2f6e82c5c9..e82d68665c0 100644 --- a/compiler/testData/psi/recovery/kt2172.txt +++ b/compiler/testData/psi/recovery/kt2172.txt @@ -10,7 +10,8 @@ JetFile: kt2172.kt PsiElement(LBRACE)('{') PsiWhiteSpace('\n\n ') OBJECT_DECLARATION - PsiElement(class)('class') + MODIFIER_LIST + PsiElement(default)('default') PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') diff --git a/compiler/testData/psiUtil/isLocalClass.kt b/compiler/testData/psiUtil/isLocalClass.kt index fc68f742e33..4b5a26f9f39 100644 --- a/compiler/testData/psiUtil/isLocalClass.kt +++ b/compiler/testData/psiUtil/isLocalClass.kt @@ -2,7 +2,7 @@ class A { class B object G - class object { + default object { class C object H diff --git a/compiler/testData/recursiveProcessor/declarations.kt b/compiler/testData/recursiveProcessor/declarations.kt index 8897e8d0942..62395d2ba8c 100644 --- a/compiler/testData/recursiveProcessor/declarations.kt +++ b/compiler/testData/recursiveProcessor/declarations.kt @@ -13,7 +13,7 @@ abstract class Class : Trait { fun classFunc(): Unit {} val classProp: Any? = null - class object { + default object { fun classObjFunc(): Unit {} val classObjProp: Any? = null } @@ -30,7 +30,7 @@ trait Outer { } abstract class NestedClass { - class object { + default object { fun nestedClassObjFunc(): Unit {} } } diff --git a/compiler/testData/renderer/Classes.kt b/compiler/testData/renderer/Classes.kt index b5da4b7088f..1ee0f6fd345 100644 --- a/compiler/testData/renderer/Classes.kt +++ b/compiler/testData/renderer/Classes.kt @@ -23,7 +23,7 @@ internal class InternalClass { trait TheTrait { fun abstractFun() - class object : TheClass { + default object : TheClass { fun classObjectFunction(): Int {} } } @@ -55,7 +55,7 @@ public trait TwoUpperBounds where T : Number, T : Any //public constructor InternalClass() defined in rendererTest.InternalClass //internal trait TheTrait defined in rendererTest //internal abstract fun abstractFun(): kotlin.Unit defined in rendererTest.TheTrait -//internal class object : rendererTest.TheClass defined in rendererTest.TheTrait +//internal default object : rendererTest.TheClass defined in rendererTest.TheTrait //private constructor Default() defined in rendererTest.TheTrait.Default //internal final fun classObjectFunction(): kotlin.Int defined in rendererTest.TheTrait.Default //public final class WithReified defined in rendererTest diff --git a/compiler/testData/resolve/candidatesPriority/classObjectOuterResolve.resolve b/compiler/testData/resolve/candidatesPriority/classObjectOuterResolve.resolve index 7715cedc1e2..a25af81c178 100644 --- a/compiler/testData/resolve/candidatesPriority/classObjectOuterResolve.resolve +++ b/compiler/testData/resolve/candidatesPriority/classObjectOuterResolve.resolve @@ -1,7 +1,7 @@ fun ~test~test() = 1 class Test { - class object { + default object { fun call() = `test`test() } diff --git a/compiler/testData/resolve/imports/ImportConflictWithClassObject.resolve b/compiler/testData/resolve/imports/ImportConflictWithClassObject.resolve index 097946d6ba6..21c38db2bd1 100644 --- a/compiler/testData/resolve/imports/ImportConflictWithClassObject.resolve +++ b/compiler/testData/resolve/imports/ImportConflictWithClassObject.resolve @@ -5,7 +5,7 @@ package test import testing.TestClass class WithClassObject { - class object { + default object { class ~class-object~TestClass } diff --git a/compiler/testData/resolveAnnotations/testFile.kt b/compiler/testData/resolveAnnotations/testFile.kt index da0511be0e0..544c54cb96c 100644 --- a/compiler/testData/resolveAnnotations/testFile.kt +++ b/compiler/testData/resolveAnnotations/testFile.kt @@ -5,7 +5,7 @@ package test import test.MyEnum.* ANNOTATION class MyClass [ANNOTATION]([ANNOTATION] param: Int, [ANNOTATION] val consProp: Int) { - ANNOTATION class object { + ANNOTATION default object { } ANNOTATION var prop: Int = 1 diff --git a/compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.kt b/compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.kt index cf448fff055..4c585e83b7d 100644 --- a/compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.kt +++ b/compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { fun invoke(i: Int) = i } } diff --git a/compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.txt b/compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.txt index e910066acf1..90a13efba23 100644 --- a/compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.txt +++ b/compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.txt @@ -1,5 +1,5 @@ class A { - class object { + default object { fun invoke(i: Int) = i } } @@ -9,7 +9,7 @@ fun test() = A(1) Resolved call: -Resulting descriptor: class object defined in A +Resulting descriptor: default object defined in A Explicit receiver kind = NO_EXPLICIT_RECEIVER Dispatch receiver = NO_RECEIVER diff --git a/compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.kt b/compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.kt index ecf46436df1..b2d4d49e984 100644 --- a/compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.kt +++ b/compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { fun invoke(i: Int) = i } } diff --git a/compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.txt b/compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.txt index f7546e3e3db..bfaeb30ec59 100644 --- a/compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.txt +++ b/compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.txt @@ -1,5 +1,5 @@ class A { - class object { + default object { fun invoke(i: Int) = i } } diff --git a/compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.kt b/compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.kt index 48b3002325d..75dad89dacb 100644 --- a/compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.kt +++ b/compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.kt @@ -1,5 +1,5 @@ class Foo { - class object { + default object { val baz = Foo() } } diff --git a/compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.txt b/compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.txt index 0f57261c36f..69203541940 100644 --- a/compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.txt +++ b/compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.txt @@ -1,5 +1,5 @@ class Foo { - class object { + default object { val baz = Foo() } } diff --git a/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt b/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt index 8073f7d9a10..623d5dcb350 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt +++ b/compiler/testData/serialization/builtinsSerializer/annotationTargets.kt @@ -32,6 +32,6 @@ class C1 [anno("constructor")] () { anno("nested class") class C2 - anno("class object") - class object {} + anno("default object") + default object {} } diff --git a/compiler/testData/serialization/builtinsSerializer/annotationTargets.txt b/compiler/testData/serialization/builtinsSerializer/annotationTargets.txt index b999b0be7b3..2d09c3c391a 100644 --- a/compiler/testData/serialization/builtinsSerializer/annotationTargets.txt +++ b/compiler/testData/serialization/builtinsSerializer/annotationTargets.txt @@ -16,7 +16,7 @@ test.anno(x = "top level class": kotlin.String) internal final class C1 { public constructor C2() } - test.anno(x = "class object": kotlin.String) internal class object Default { + test.anno(x = "default object": kotlin.String) internal default object Default { private constructor Default() } } diff --git a/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt b/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt index d061bafe550..a5e2dc435fd 100644 --- a/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt +++ b/compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt @@ -1,5 +1,5 @@ class MyClass { - deprecated("") class object { + deprecated("") default object { } } diff --git a/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt b/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt index 0b00fc78e3c..32768434706 100644 --- a/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt +++ b/compiler/testData/writeFlags/class/visibility/private/innerEnum.kt @@ -1,4 +1,4 @@ -// NO_FLAGS because we put enum in class object of foo. When it will be fixed - MyClass should have ACC_PRIVATE flag +// NO_FLAGS because we put enum in default object of foo. When it will be fixed - MyClass should have ACC_PRIVATE flag class Foo { private enum class MyClass() { diff --git a/compiler/testData/writeFlags/function/classObjectPrivate/privateFun.kt b/compiler/testData/writeFlags/function/classObjectPrivate/privateFun.kt index a9a97c07e50..98cf104d973 100644 --- a/compiler/testData/writeFlags/function/classObjectPrivate/privateFun.kt +++ b/compiler/testData/writeFlags/function/classObjectPrivate/privateFun.kt @@ -2,7 +2,7 @@ class Foo { {Foo.test()} - class object { + default object { private fun test() { } diff --git a/compiler/testData/writeFlags/function/classObjectPrivate/privateVal.kt b/compiler/testData/writeFlags/function/classObjectPrivate/privateVal.kt index 4c4d159593f..fa0dcac320d 100644 --- a/compiler/testData/writeFlags/function/classObjectPrivate/privateVal.kt +++ b/compiler/testData/writeFlags/function/classObjectPrivate/privateVal.kt @@ -2,7 +2,7 @@ class Foo { {Foo.test} - class object { + default object { private val test = "String" } } diff --git a/compiler/testData/writeFlags/function/classObjectPrivate/privateVar.kt b/compiler/testData/writeFlags/function/classObjectPrivate/privateVar.kt index bee6e51d2b3..7c3368ebf6f 100644 --- a/compiler/testData/writeFlags/function/classObjectPrivate/privateVar.kt +++ b/compiler/testData/writeFlags/function/classObjectPrivate/privateVar.kt @@ -2,7 +2,7 @@ class Foo { {Foo.test} - class object { + default object { private var test = "String" } } diff --git a/compiler/testData/writeFlags/function/constructors/classObject.kt b/compiler/testData/writeFlags/function/constructors/classObject.kt index cae5f5fc19e..c514b0ec93f 100644 --- a/compiler/testData/writeFlags/function/constructors/classObject.kt +++ b/compiler/testData/writeFlags/function/constructors/classObject.kt @@ -1,5 +1,5 @@ class Foo { - class object { + default object { } } diff --git a/compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt b/compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt index f1dcade2d07..b7cfa214485 100644 --- a/compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt +++ b/compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt @@ -1,5 +1,5 @@ class MyClass() { - class object { + default object { deprecated("") fun test() {} } } diff --git a/compiler/testData/writeFlags/innerClass/visibility/internalClassObject.kt b/compiler/testData/writeFlags/innerClass/visibility/internalClassObject.kt index 3f9f6d32859..8ba9b044696 100644 --- a/compiler/testData/writeFlags/innerClass/visibility/internalClassObject.kt +++ b/compiler/testData/writeFlags/innerClass/visibility/internalClassObject.kt @@ -1,5 +1,5 @@ class Foo { - class object { + default object { } } diff --git a/compiler/testData/writeFlags/innerClass/visibility/privateClassObject.kt b/compiler/testData/writeFlags/innerClass/visibility/privateClassObject.kt index e1d0bd5b5bd..91ff8272db8 100644 --- a/compiler/testData/writeFlags/innerClass/visibility/privateClassObject.kt +++ b/compiler/testData/writeFlags/innerClass/visibility/privateClassObject.kt @@ -1,5 +1,5 @@ class Foo { - private class object { + private default object { } } diff --git a/compiler/testData/writeFlags/innerClass/visibility/publicClassObject.kt b/compiler/testData/writeFlags/innerClass/visibility/publicClassObject.kt index 381ea70a0f0..e4370e33357 100644 --- a/compiler/testData/writeFlags/innerClass/visibility/publicClassObject.kt +++ b/compiler/testData/writeFlags/innerClass/visibility/publicClassObject.kt @@ -1,5 +1,5 @@ class Foo { - public class object { + public default object { } } diff --git a/compiler/testData/writeFlags/property/classObject/class/delegatedProtectedVar.kt b/compiler/testData/writeFlags/property/classObject/class/delegatedProtectedVar.kt index 4b3a97ac9c9..81cd603aeeb 100644 --- a/compiler/testData/writeFlags/property/classObject/class/delegatedProtectedVar.kt +++ b/compiler/testData/writeFlags/property/classObject/class/delegatedProtectedVar.kt @@ -10,7 +10,7 @@ class TestDelegate() { class Test { - class object { + default object { protected var prop: Int by TestDelegate() } } diff --git a/compiler/testData/writeFlags/property/classObject/class/delegatedPublicVal.kt b/compiler/testData/writeFlags/property/classObject/class/delegatedPublicVal.kt index 46de21ea211..721f0946d01 100644 --- a/compiler/testData/writeFlags/property/classObject/class/delegatedPublicVal.kt +++ b/compiler/testData/writeFlags/property/classObject/class/delegatedPublicVal.kt @@ -5,7 +5,7 @@ class TestDelegate() { } class Test { - class object { + default object { public val prop: Int by TestDelegate() } } diff --git a/compiler/testData/writeFlags/property/classObject/class/internalVal.kt b/compiler/testData/writeFlags/property/classObject/class/internalVal.kt index d59dfe992e7..2af5820bd0d 100644 --- a/compiler/testData/writeFlags/property/classObject/class/internalVal.kt +++ b/compiler/testData/writeFlags/property/classObject/class/internalVal.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { var prop: Int = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/class/internalVar.kt b/compiler/testData/writeFlags/property/classObject/class/internalVar.kt index d59dfe992e7..2af5820bd0d 100644 --- a/compiler/testData/writeFlags/property/classObject/class/internalVar.kt +++ b/compiler/testData/writeFlags/property/classObject/class/internalVar.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { var prop: Int = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt index adc39620228..cc41c55f11b 100644 --- a/compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { var prop: Int = 0 private set } diff --git a/compiler/testData/writeFlags/property/classObject/class/noBackingField.kt b/compiler/testData/writeFlags/property/classObject/class/noBackingField.kt index f2a61c3dccd..e6dda375ee8 100644 --- a/compiler/testData/writeFlags/property/classObject/class/noBackingField.kt +++ b/compiler/testData/writeFlags/property/classObject/class/noBackingField.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { var prop: Int get() { return 10 diff --git a/compiler/testData/writeFlags/property/classObject/class/privateVal.kt b/compiler/testData/writeFlags/property/classObject/class/privateVal.kt index 115436e494f..c33450e9c02 100644 --- a/compiler/testData/writeFlags/property/classObject/class/privateVal.kt +++ b/compiler/testData/writeFlags/property/classObject/class/privateVal.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { private val prop = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/class/privateVar.kt b/compiler/testData/writeFlags/property/classObject/class/privateVar.kt index dd756970298..fcbdc67f551 100644 --- a/compiler/testData/writeFlags/property/classObject/class/privateVar.kt +++ b/compiler/testData/writeFlags/property/classObject/class/privateVar.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { private var prop = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/class/protectedVal.kt b/compiler/testData/writeFlags/property/classObject/class/protectedVal.kt index 119b3c72a5a..729667b95c9 100644 --- a/compiler/testData/writeFlags/property/classObject/class/protectedVal.kt +++ b/compiler/testData/writeFlags/property/classObject/class/protectedVal.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { protected val prop: Int = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt index 8fe0fcb311b..d620609491c 100644 --- a/compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { protected var prop: Int = 0 private set } diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVal.kt b/compiler/testData/writeFlags/property/classObject/class/publicVal.kt index 8fa8fa4efaf..49090eb22db 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVal.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVal.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { public val prop: Int = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt b/compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt index 6cf279abc75..5a2fc673ae3 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { public val prop: Int = 0 get() { return $prop diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVar.kt b/compiler/testData/writeFlags/property/classObject/class/publicVar.kt index 303a8a95e7c..6d1a2988d08 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVar.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVar.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { public var prop: Int = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt b/compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt index 2fdb4e93217..de7f4f19da0 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { public var prop: Int = 0 set(i : Int) { $prop = i diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt index 2e45aeefbb1..f9be8e26c07 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { public var prop: Int = 0 private set } diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt b/compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt index 6f88d81fc4c..dc60da36bf7 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { public var prop: Int = 0 protected set } diff --git a/compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt b/compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt index 1b01d5097a3..5dab1594050 100644 --- a/compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt +++ b/compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { public var prop: Int = 0 public set } diff --git a/compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt b/compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt index 2e8655c2559..4edd53208bc 100644 --- a/compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt +++ b/compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt @@ -1,6 +1,6 @@ class Test(val prop: String) { - class object { + default object { public val prop : String = "CO"; } diff --git a/compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt b/compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt index 24c72a024b2..6d311ad5451 100644 --- a/compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt +++ b/compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt @@ -17,7 +17,7 @@ class Test { public val prop: Int by TestDelegate({10}) - class object { + default object { public var prop: Int by TestDelegate({10}) } } diff --git a/compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt b/compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt index e282b69ec77..89e55737922 100644 --- a/compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt +++ b/compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt @@ -17,7 +17,7 @@ class Test { public var prop: String = "" - class object { + default object { public var prop: Int by TestDelegate({10}) } } diff --git a/compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt b/compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt index ad56dca52cb..1aa85241b47 100644 --- a/compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt +++ b/compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt @@ -2,7 +2,7 @@ class Test { public var prop: Int = 0; - class object { + default object { public val prop: Int = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt b/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt index afa6e39c0ee..bf9c75b89fd 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt @@ -9,7 +9,7 @@ class TestDelegate() { } trait Test { - class object { + default object { protected var prop: Int by TestDelegate() } } diff --git a/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt b/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt index 3a50b1ba148..3f215c26bec 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt @@ -5,7 +5,7 @@ class TestDelegate() { } trait Test { - class object { + default object { public val prop: Int by TestDelegate() } } diff --git a/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt b/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt index aa94657afab..fe9a4588f8e 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/internalVal.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { val prop: Int = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt b/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt index 9b92dc43328..055c6297d55 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/internalVar.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { var prop: Int = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt index 51fb570b5f1..d8194f367ef 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { var prop: Int = 0 private set } diff --git a/compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt b/compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt index 18dec2964a2..81874d9857b 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { var prop: Int get() { return 10 diff --git a/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt b/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt index d193b913c20..a1e707f555b 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/privateVal.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { private val prop = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt b/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt index ce154947126..53a6c6e34a1 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/privateVar.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { private var prop = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt b/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt index 238db4731ce..6ecc2dbb3d1 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { protected val prop: Int = 0 } } diff --git a/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt index 5742e5782fe..0940cb2553a 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { protected var prop: Int = 0 private set } diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt index d39051e0c1a..a609b7d6632 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVal.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { public val prop: Int = 0; } } diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt b/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt index 8a3f480d90d..df0494ffe5f 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { public val prop: Int = 0 get() { return $prop diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt index fcca5632d31..115f77c9890 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVar.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { public var prop: Int = 0 } } diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt index ac0fdb7c5a0..3b6c04effd1 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { public var prop: Int = 0 set(i : Int) { $prop = i diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt index 94cf72b6c0e..57bb8ca63ad 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { public var prop: Int = 0 private set } diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt index 03286512b46..2668bf99c5f 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { public var prop: Int = 0 protected set } diff --git a/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt b/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt index 1995a9debc2..369e38a1aa3 100644 --- a/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt +++ b/compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt @@ -1,5 +1,5 @@ trait Test { - class object { + default object { public var prop: Int = 0 public set } diff --git a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java index ef4a10a0410..3e3037a2cec 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java +++ b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java @@ -238,7 +238,7 @@ public class DescriptorRendererImpl implements DescriptorRenderer { private void renderDefaultObjectName(@NotNull DeclarationDescriptor descriptor, @NotNull StringBuilder builder) { if (renderDefaultObjectName) { if (startFromName) { - builder.append("class object"); + builder.append("default object"); } renderSpaceIfNeeded(builder); DeclarationDescriptor containingDeclaration = descriptor.getContainingDeclaration(); @@ -1002,7 +1002,7 @@ public class DescriptorRendererImpl implements DescriptorRenderer { @NotNull public static String getClassKindPrefix(@NotNull ClassDescriptor klass) { if (klass.isDefaultObject()) { - return "class object"; + return "default object"; } switch (klass.getKind()) { case CLASS: diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/generateTestDataForReservedWords.kt b/generators/src/org/jetbrains/kotlin/generators/tests/generateTestDataForReservedWords.kt index ad529180018..81cecb72b6a 100644 --- a/generators/src/org/jetbrains/kotlin/generators/tests/generateTestDataForReservedWords.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/generateTestDataForReservedWords.kt @@ -56,8 +56,8 @@ fun box(): String { ) { commonCasesWithTestNotRenamed() - case("class", "class $KEYWORD_MARKER { class object {} }", "", testNotRenamedByName) - case("trait", "trait $KEYWORD_MARKER { class object {} }", "", testNotRenamedByName) + case("class", "class $KEYWORD_MARKER { default object {} }", "", testNotRenamedByName) + case("trait", "trait $KEYWORD_MARKER { default object {} }", "", testNotRenamedByName) case("enum", "enum class $KEYWORD_MARKER { foo }", "", testNotRenamed("$KEYWORD_MARKER.foo")) case("object", "object $KEYWORD_MARKER {}", "", testNotRenamedByName) } @@ -106,7 +106,7 @@ fun box(): String { suite("insideClassObject", """ class TestClass { - class object { + default object { $DEFINITION_MARKER fun test() { diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinSuppressableWarningProblemGroup.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinSuppressableWarningProblemGroup.kt index da8e2c9ba4d..a24746574de 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinSuppressableWarningProblemGroup.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinSuppressableWarningProblemGroup.kt @@ -99,7 +99,7 @@ private object DeclarationKindDetector : JetVisitor( override fun visitParameter(d: JetParameter, _: Unit?) = detect(d, "parameter", newLineNeeded = false) override fun visitObjectDeclaration(d: JetObjectDeclaration, _: Unit?): AnnotationHostKind? { - if (d.isDefault()) return detect(d, "class object", name = "${d.getName()} of ${d.getStrictParentOfType()?.getName()}") + if (d.isDefault()) return detect(d, "default object", name = "${d.getName()} of ${d.getStrictParentOfType()?.getName()}") if (d.getParent() is JetObjectLiteralExpression) return null return detect(d, "object") } diff --git a/idea/testData/addImport/ConflictingNameAppearsAndHasUsage4.dependency.kt b/idea/testData/addImport/ConflictingNameAppearsAndHasUsage4.dependency.kt index 8304ee70896..796e18df1e2 100644 --- a/idea/testData/addImport/ConflictingNameAppearsAndHasUsage4.dependency.kt +++ b/idea/testData/addImport/ConflictingNameAppearsAndHasUsage4.dependency.kt @@ -1,7 +1,7 @@ package dependency class Date { - class object { + default object { val VALUE = 0 } } diff --git a/idea/testData/checker/Builders.kt b/idea/testData/checker/Builders.kt index a697ac7d73e..f85264161f4 100644 --- a/idea/testData/checker/Builders.kt +++ b/idea/testData/checker/Builders.kt @@ -30,7 +30,7 @@ import java.util.* } class HTML() : TagWithText("html") { - class object : Factory { + default object : Factory { override fun create() = HTML() } @@ -40,7 +40,7 @@ import java.util.* } class Head() : TagWithText("head") { - class object : Factory { + default object : Factory { override fun create() = Head() } @@ -53,7 +53,7 @@ import java.util.* } class Body() : BodyTag("body") { - class object : Factory { + default object : Factory { override fun create() = Body() } diff --git a/idea/testData/checker/ClassObjectInEnum.kt b/idea/testData/checker/ClassObjectInEnum.kt index 3d5dcbae0c5..afcf88f1379 100644 --- a/idea/testData/checker/ClassObjectInEnum.kt +++ b/idea/testData/checker/ClassObjectInEnum.kt @@ -1,7 +1,7 @@ enum class E { ENTRY - class object { + default object { fun foo(): E = ENTRY fun bar(): Array = values() fun baz(): E = valueOf("ENTRY") diff --git a/idea/testData/checker/ClassObjects.kt b/idea/testData/checker/ClassObjects.kt index e03a2111713..8f3b7a7a751 100644 --- a/idea/testData/checker/ClassObjects.kt +++ b/idea/testData/checker/ClassObjects.kt @@ -1,10 +1,10 @@ package Jet86 class A { - class object { + default object { val x = 1 } - class object Another { // error + default object Another { // error val x = 1 } } @@ -14,7 +14,7 @@ class B() { } object b { - class object { + default object { val x = 1 } // error diff --git a/idea/testData/checker/MultipleBounds.kt b/idea/testData/checker/MultipleBounds.kt index 39be0100b2d..46337372c0b 100644 --- a/idea/testData/checker/MultipleBounds.kt +++ b/idea/testData/checker/MultipleBounds.kt @@ -11,7 +11,7 @@ trait B { class C() : A(), B class D() { - class object : A(), B {} + default object : A(), B {} } class Test1() diff --git a/idea/testData/checker/PlatformStaticUsagesRuntime.kt b/idea/testData/checker/PlatformStaticUsagesRuntime.kt index 613e46bcd68..0441c18f4b7 100644 --- a/idea/testData/checker/PlatformStaticUsagesRuntime.kt +++ b/idea/testData/checker/PlatformStaticUsagesRuntime.kt @@ -3,7 +3,7 @@ import kotlin.platform.platformStatic platformStatic class A { platformStatic - class object { + default object { platformStatic fun a1() { } @@ -31,7 +31,7 @@ class B { - class object { + default object { platformStatic fun a1() { } diff --git a/idea/testData/checker/duplicateJvmSignature/fields/classObjectCopiedFieldObject.kt b/idea/testData/checker/duplicateJvmSignature/fields/classObjectCopiedFieldObject.kt index f234d5e0b0a..4a3bdb5405e 100644 --- a/idea/testData/checker/duplicateJvmSignature/fields/classObjectCopiedFieldObject.kt +++ b/idea/testData/checker/duplicateJvmSignature/fields/classObjectCopiedFieldObject.kt @@ -1,5 +1,5 @@ class C { - class object { + default object { val Default = this } diff --git a/idea/testData/checker/duplicateJvmSignature/functionAndProperty/classObject.kt b/idea/testData/checker/duplicateJvmSignature/functionAndProperty/classObject.kt index 5c99c034738..60e7be43d45 100644 --- a/idea/testData/checker/duplicateJvmSignature/functionAndProperty/classObject.kt +++ b/idea/testData/checker/duplicateJvmSignature/functionAndProperty/classObject.kt @@ -1,5 +1,5 @@ class C { - class object { + default object { val x = 1 fun getX() = 1 } diff --git a/idea/testData/checker/regression/extensionMemberInClassObject.kt b/idea/testData/checker/regression/extensionMemberInClassObject.kt index 11e4f96c9e2..26c690f54a8 100644 --- a/idea/testData/checker/regression/extensionMemberInClassObject.kt +++ b/idea/testData/checker/regression/extensionMemberInClassObject.kt @@ -3,7 +3,7 @@ trait Bar { } class A { - class object : Bar + default object : Bar } fun test() { diff --git a/idea/testData/codeInsight/lineMarker/ClassObjectInStaticNestedClass.kt b/idea/testData/codeInsight/lineMarker/ClassObjectInStaticNestedClass.kt index 4180151cf87..b3c41dd37e4 100644 --- a/idea/testData/codeInsight/lineMarker/ClassObjectInStaticNestedClass.kt +++ b/idea/testData/codeInsight/lineMarker/ClassObjectInStaticNestedClass.kt @@ -4,7 +4,7 @@ trait TestTrait { class A { class B { - class object : TestTrait { // TODO: No line marker + default object : TestTrait { // TODO: No line marker override fun test() { } } diff --git a/idea/testData/completion/basic/common/ExtensionFunctionInClassObject.kt b/idea/testData/completion/basic/common/ExtensionFunctionInClassObject.kt index e9ea62f7eb6..00ade7b45df 100644 --- a/idea/testData/completion/basic/common/ExtensionFunctionInClassObject.kt +++ b/idea/testData/completion/basic/common/ExtensionFunctionInClassObject.kt @@ -3,7 +3,7 @@ package p class B class R { - class object { + default object { fun B.f() { this. } diff --git a/idea/testData/completion/basic/common/InClassObject.kt b/idea/testData/completion/basic/common/InClassObject.kt index 8508b24d0c3..51f32cbf233 100644 --- a/idea/testData/completion/basic/common/InClassObject.kt +++ b/idea/testData/completion/basic/common/InClassObject.kt @@ -4,7 +4,7 @@ class C { inner class InnerClass object AnObject - class object { + default object { val classObjectField = 0 class ClassObjectClass diff --git a/idea/testData/completion/basic/common/InNestedClass.kt b/idea/testData/completion/basic/common/InNestedClass.kt index 55e50ee7d05..f00bf6705e1 100644 --- a/idea/testData/completion/basic/common/InNestedClass.kt +++ b/idea/testData/completion/basic/common/InNestedClass.kt @@ -9,7 +9,7 @@ class C { } } - class object { + default object { fun fromClassObject(){} } } diff --git a/idea/testData/completion/basic/common/NestedClassesOnClassWithDefaultObject.kt b/idea/testData/completion/basic/common/NestedClassesOnClassWithDefaultObject.kt index c41c1d5dd55..0c73a85a851 100644 --- a/idea/testData/completion/basic/common/NestedClassesOnClassWithDefaultObject.kt +++ b/idea/testData/completion/basic/common/NestedClassesOnClassWithDefaultObject.kt @@ -2,7 +2,7 @@ class A { class Nested inner class Inner - class object { + default object { class Nested2 val c: Int = 1 object Obj2 diff --git a/idea/testData/completion/basic/common/NestedClassesOnClassWithNamedDefaultObject.kt b/idea/testData/completion/basic/common/NestedClassesOnClassWithNamedDefaultObject.kt index 8deeae16947..0369ebea36c 100644 --- a/idea/testData/completion/basic/common/NestedClassesOnClassWithNamedDefaultObject.kt +++ b/idea/testData/completion/basic/common/NestedClassesOnClassWithNamedDefaultObject.kt @@ -2,7 +2,7 @@ class A { class Nested inner class Inner - class object Named { + default object Named { class Nested2 val c: Int = 1 object Obj2 diff --git a/idea/testData/completion/basic/common/NestedClassesOnDefaultObjectLiteral.kt b/idea/testData/completion/basic/common/NestedClassesOnDefaultObjectLiteral.kt index e1a7b1eba57..fca31fec862 100644 --- a/idea/testData/completion/basic/common/NestedClassesOnDefaultObjectLiteral.kt +++ b/idea/testData/completion/basic/common/NestedClassesOnDefaultObjectLiteral.kt @@ -2,7 +2,7 @@ class A { class Nested inner class Inner - class object Named { + default object Named { class Nested2 val c: Int = 1 object Obj2 diff --git a/idea/testData/completion/basic/common/OverloadFunctions.kt b/idea/testData/completion/basic/common/OverloadFunctions.kt index df91ec7b5f9..03095238b43 100644 --- a/idea/testData/completion/basic/common/OverloadFunctions.kt +++ b/idea/testData/completion/basic/common/OverloadFunctions.kt @@ -1,7 +1,7 @@ package Test.MyTest class A { - class object { + default object { public fun testOther() { } diff --git a/idea/testData/completion/basic/common/classObjectElementsInClass.kt b/idea/testData/completion/basic/common/classObjectElementsInClass.kt index ff9b87cf36a..d792d042d26 100644 --- a/idea/testData/completion/basic/common/classObjectElementsInClass.kt +++ b/idea/testData/completion/basic/common/classObjectElementsInClass.kt @@ -1,5 +1,5 @@ class Some { - class object { + default object { val coProp = 12 fun coFun = 12 diff --git a/idea/testData/completion/basic/common/extensions/ExtensionOnNestedClassObject.kt b/idea/testData/completion/basic/common/extensions/ExtensionOnNestedClassObject.kt index 0a21e79e69c..22268ee1a50 100644 --- a/idea/testData/completion/basic/common/extensions/ExtensionOnNestedClassObject.kt +++ b/idea/testData/completion/basic/common/extensions/ExtensionOnNestedClassObject.kt @@ -2,7 +2,7 @@ package foo class A { class B { - class object + default object } } diff --git a/idea/testData/completion/basic/common/extensions/NoExtensionFromOuter.kt b/idea/testData/completion/basic/common/extensions/NoExtensionFromOuter.kt index 45fbabdba84..22a71a5aeec 100644 --- a/idea/testData/completion/basic/common/extensions/NoExtensionFromOuter.kt +++ b/idea/testData/completion/basic/common/extensions/NoExtensionFromOuter.kt @@ -1,7 +1,7 @@ class C { fun String.memberExtForString(){} - class object { + default object { fun foo() { "". } diff --git a/idea/testData/completion/basic/multifile/NotImportedObject/NotImportedObject.dependency.kt b/idea/testData/completion/basic/multifile/NotImportedObject/NotImportedObject.dependency.kt index df943f44992..cab9c0b53b3 100644 --- a/idea/testData/completion/basic/multifile/NotImportedObject/NotImportedObject.dependency.kt +++ b/idea/testData/completion/basic/multifile/NotImportedObject/NotImportedObject.dependency.kt @@ -8,7 +8,7 @@ fun some() { } class Some { - class object { + default object { object NamedObjectInClassObject } } diff --git a/idea/testData/completion/handlers/ClassFromClassObject.kt b/idea/testData/completion/handlers/ClassFromClassObject.kt index 52fad454bf0..79730de367e 100644 --- a/idea/testData/completion/handlers/ClassFromClassObject.kt +++ b/idea/testData/completion/handlers/ClassFromClassObject.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { class Some } } diff --git a/idea/testData/completion/handlers/ClassFromClassObject.kt.after b/idea/testData/completion/handlers/ClassFromClassObject.kt.after index 5a235d8bf9c..67472b6022b 100644 --- a/idea/testData/completion/handlers/ClassFromClassObject.kt.after +++ b/idea/testData/completion/handlers/ClassFromClassObject.kt.after @@ -1,5 +1,5 @@ class Test { - class object { + default object { class Some } } diff --git a/idea/testData/completion/handlers/ClassFromClassObjectInPackage.kt b/idea/testData/completion/handlers/ClassFromClassObjectInPackage.kt index 9a62ef39f58..72f0fb5a3b9 100644 --- a/idea/testData/completion/handlers/ClassFromClassObjectInPackage.kt +++ b/idea/testData/completion/handlers/ClassFromClassObjectInPackage.kt @@ -1,7 +1,7 @@ package a class Test { - class object { + default object { class Some } } diff --git a/idea/testData/completion/handlers/ClassFromClassObjectInPackage.kt.after b/idea/testData/completion/handlers/ClassFromClassObjectInPackage.kt.after index 7fc63eeb45e..c44ecb507f2 100644 --- a/idea/testData/completion/handlers/ClassFromClassObjectInPackage.kt.after +++ b/idea/testData/completion/handlers/ClassFromClassObjectInPackage.kt.after @@ -1,7 +1,7 @@ package a class Test { - class object { + default object { class Some } } diff --git a/idea/testData/completion/handlers/ExistingSingleBrackets.kt b/idea/testData/completion/handlers/ExistingSingleBrackets.kt index 141815f2397..7b7d870a7b5 100644 --- a/idea/testData/completion/handlers/ExistingSingleBrackets.kt +++ b/idea/testData/completion/handlers/ExistingSingleBrackets.kt @@ -1,7 +1,7 @@ package Test.MyTest class A { - class object { + default object { public fun testOther(a: Int) { } diff --git a/idea/testData/completion/handlers/ExistingSingleBrackets.kt.after b/idea/testData/completion/handlers/ExistingSingleBrackets.kt.after index 9c8dcb84ac9..c50e1491960 100644 --- a/idea/testData/completion/handlers/ExistingSingleBrackets.kt.after +++ b/idea/testData/completion/handlers/ExistingSingleBrackets.kt.after @@ -1,7 +1,7 @@ package Test.MyTest class A { - class object { + default object { public fun testOther(a: Int) { } diff --git a/idea/testData/completion/handlers/SingleBrackets.kt b/idea/testData/completion/handlers/SingleBrackets.kt index 488fc2488a4..ffddb36acc4 100644 --- a/idea/testData/completion/handlers/SingleBrackets.kt +++ b/idea/testData/completion/handlers/SingleBrackets.kt @@ -1,7 +1,7 @@ package Test.MyTest class A { - class object { + default object { public fun testOther(a: Boolean) { } diff --git a/idea/testData/completion/handlers/SingleBrackets.kt.after b/idea/testData/completion/handlers/SingleBrackets.kt.after index e27f5c9b103..9a0d6478c52 100644 --- a/idea/testData/completion/handlers/SingleBrackets.kt.after +++ b/idea/testData/completion/handlers/SingleBrackets.kt.after @@ -1,7 +1,7 @@ package Test.MyTest class A { - class object { + default object { public fun testOther(a: Boolean) { } diff --git a/idea/testData/completion/handlers/basic/ClassWithClassObject.kt b/idea/testData/completion/handlers/basic/ClassWithClassObject.kt index 6f57db722b3..db8a60b55a6 100644 --- a/idea/testData/completion/handlers/basic/ClassWithClassObject.kt +++ b/idea/testData/completion/handlers/basic/ClassWithClassObject.kt @@ -1,5 +1,5 @@ class AClass { - class object {} + default object {} } fun foo() { diff --git a/idea/testData/completion/handlers/basic/ClassWithClassObject.kt.after b/idea/testData/completion/handlers/basic/ClassWithClassObject.kt.after index 6976def39b0..7bd334bdb86 100644 --- a/idea/testData/completion/handlers/basic/ClassWithClassObject.kt.after +++ b/idea/testData/completion/handlers/basic/ClassWithClassObject.kt.after @@ -1,5 +1,5 @@ class AClass { - class object {} + default object {} } fun foo() { diff --git a/idea/testData/completion/handlers/multifile/ClassWithClassObject-2.kt b/idea/testData/completion/handlers/multifile/ClassWithClassObject-2.kt index 13cce197389..443f4e60ff6 100644 --- a/idea/testData/completion/handlers/multifile/ClassWithClassObject-2.kt +++ b/idea/testData/completion/handlers/multifile/ClassWithClassObject-2.kt @@ -3,7 +3,7 @@ package pack class KtClass { fun foo(){} - class object { + default object { fun staticFoo(){} } } \ No newline at end of file diff --git a/idea/testData/completion/handlers/smart/ClassInClassObject.kt b/idea/testData/completion/handlers/smart/ClassInClassObject.kt index f1b929249a3..97e63949e05 100644 --- a/idea/testData/completion/handlers/smart/ClassInClassObject.kt +++ b/idea/testData/completion/handlers/smart/ClassInClassObject.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { class Inner {} } } diff --git a/idea/testData/completion/handlers/smart/ClassInClassObject.kt.after b/idea/testData/completion/handlers/smart/ClassInClassObject.kt.after index 2d47e82105c..c511cccd8dd 100644 --- a/idea/testData/completion/handlers/smart/ClassInClassObject.kt.after +++ b/idea/testData/completion/handlers/smart/ClassInClassObject.kt.after @@ -1,5 +1,5 @@ class A { - class object { + default object { class Inner {} } } diff --git a/idea/testData/completion/handlers/smart/ClassObjectFieldKeywordName.kt b/idea/testData/completion/handlers/smart/ClassObjectFieldKeywordName.kt index 519c3a6d66e..3b30bc27ff3 100644 --- a/idea/testData/completion/handlers/smart/ClassObjectFieldKeywordName.kt +++ b/idea/testData/completion/handlers/smart/ClassObjectFieldKeywordName.kt @@ -1,7 +1,7 @@ package `package` class `class` { - class object { + default object { val `val` = `class`() } } diff --git a/idea/testData/completion/handlers/smart/ClassObjectFieldKeywordName.kt.after b/idea/testData/completion/handlers/smart/ClassObjectFieldKeywordName.kt.after index 21a4a48eff8..a0c64f2ae47 100644 --- a/idea/testData/completion/handlers/smart/ClassObjectFieldKeywordName.kt.after +++ b/idea/testData/completion/handlers/smart/ClassObjectFieldKeywordName.kt.after @@ -1,7 +1,7 @@ package `package` class `class` { - class object { + default object { val `val` = `class`() } } diff --git a/idea/testData/completion/handlers/smart/ClassObjectMethod1.kt b/idea/testData/completion/handlers/smart/ClassObjectMethod1.kt index 162063cd52f..5df44f1ce9a 100644 --- a/idea/testData/completion/handlers/smart/ClassObjectMethod1.kt +++ b/idea/testData/completion/handlers/smart/ClassObjectMethod1.kt @@ -1,7 +1,7 @@ package sample class K { - class object { + default object { fun bar(): K = K() } } diff --git a/idea/testData/completion/handlers/smart/ClassObjectMethod1.kt.after b/idea/testData/completion/handlers/smart/ClassObjectMethod1.kt.after index 4925f54e351..6911f8093b6 100644 --- a/idea/testData/completion/handlers/smart/ClassObjectMethod1.kt.after +++ b/idea/testData/completion/handlers/smart/ClassObjectMethod1.kt.after @@ -1,7 +1,7 @@ package sample class K { - class object { + default object { fun bar(): K = K() } } diff --git a/idea/testData/completion/handlers/smart/ClassObjectMethod2.kt b/idea/testData/completion/handlers/smart/ClassObjectMethod2.kt index 97ffae689b7..6128d507e3a 100644 --- a/idea/testData/completion/handlers/smart/ClassObjectMethod2.kt +++ b/idea/testData/completion/handlers/smart/ClassObjectMethod2.kt @@ -1,7 +1,7 @@ package sample class K { - class object { + default object { fun bar(p: Int): K = K() } } diff --git a/idea/testData/completion/handlers/smart/ClassObjectMethod2.kt.after b/idea/testData/completion/handlers/smart/ClassObjectMethod2.kt.after index 453af7507e1..f66de53ff65 100644 --- a/idea/testData/completion/handlers/smart/ClassObjectMethod2.kt.after +++ b/idea/testData/completion/handlers/smart/ClassObjectMethod2.kt.after @@ -1,7 +1,7 @@ package sample class K { - class object { + default object { fun bar(p: Int): K = K() } } diff --git a/idea/testData/completion/handlers/smart/ClassObjectMethod3.kt b/idea/testData/completion/handlers/smart/ClassObjectMethod3.kt index 0f8ed0a092c..d9c6a3dbb15 100644 --- a/idea/testData/completion/handlers/smart/ClassObjectMethod3.kt +++ b/idea/testData/completion/handlers/smart/ClassObjectMethod3.kt @@ -1,7 +1,7 @@ package sample class K { - class object { + default object { fun bar(p: () -> Unit): K = K() } } diff --git a/idea/testData/completion/handlers/smart/ClassObjectMethod3.kt.after b/idea/testData/completion/handlers/smart/ClassObjectMethod3.kt.after index 1984477df96..acf6fa42dd7 100644 --- a/idea/testData/completion/handlers/smart/ClassObjectMethod3.kt.after +++ b/idea/testData/completion/handlers/smart/ClassObjectMethod3.kt.after @@ -1,7 +1,7 @@ package sample class K { - class object { + default object { fun bar(p: () -> Unit): K = K() } } diff --git a/idea/testData/completion/handlers/smart/ClassObjectMethod4.kt b/idea/testData/completion/handlers/smart/ClassObjectMethod4.kt index c1b0dcbe4df..d00db9ebeee 100644 --- a/idea/testData/completion/handlers/smart/ClassObjectMethod4.kt +++ b/idea/testData/completion/handlers/smart/ClassObjectMethod4.kt @@ -1,7 +1,7 @@ package sample class K { - class object { + default object { fun bar(p: (Int, String) -> Unit): K = K() } } diff --git a/idea/testData/completion/handlers/smart/ClassObjectMethod4.kt.after b/idea/testData/completion/handlers/smart/ClassObjectMethod4.kt.after index 6e970d12d0d..3209cd19a4b 100644 --- a/idea/testData/completion/handlers/smart/ClassObjectMethod4.kt.after +++ b/idea/testData/completion/handlers/smart/ClassObjectMethod4.kt.after @@ -1,7 +1,7 @@ package sample class K { - class object { + default object { fun bar(p: (Int, String) -> Unit): K = K() } } diff --git a/idea/testData/completion/handlers/smart/MergeTail3.kt b/idea/testData/completion/handlers/smart/MergeTail3.kt index abc34ca9cf0..35b92e2818b 100644 --- a/idea/testData/completion/handlers/smart/MergeTail3.kt +++ b/idea/testData/completion/handlers/smart/MergeTail3.kt @@ -1,5 +1,5 @@ class C { - class object { + default object { fun f1(): C = C() fun f2(): C = C() fun f3(): C? = C() diff --git a/idea/testData/completion/handlers/smart/MergeTail3.kt.after b/idea/testData/completion/handlers/smart/MergeTail3.kt.after index 5a653ff48d5..3d833674c96 100644 --- a/idea/testData/completion/handlers/smart/MergeTail3.kt.after +++ b/idea/testData/completion/handlers/smart/MergeTail3.kt.after @@ -1,5 +1,5 @@ class C { - class object { + default object { fun f1(): C = C() fun f2(): C = C() fun f3(): C? = C() diff --git a/idea/testData/completion/handlers/smart/MergeTail4.kt b/idea/testData/completion/handlers/smart/MergeTail4.kt index edd492204c6..15e81513baf 100644 --- a/idea/testData/completion/handlers/smart/MergeTail4.kt +++ b/idea/testData/completion/handlers/smart/MergeTail4.kt @@ -1,5 +1,5 @@ class C { - class object { + default object { fun f1(): C = C() fun f2(): C = C() fun f3(): C? = C() diff --git a/idea/testData/completion/handlers/smart/MergeTail4.kt.after b/idea/testData/completion/handlers/smart/MergeTail4.kt.after index 5c5e0d2ddb2..62603e364c4 100644 --- a/idea/testData/completion/handlers/smart/MergeTail4.kt.after +++ b/idea/testData/completion/handlers/smart/MergeTail4.kt.after @@ -1,5 +1,5 @@ class C { - class object { + default object { fun f1(): C = C() fun f2(): C = C() fun f3(): C? = C() diff --git a/idea/testData/completion/handlers/smart/NullableValue3.kt b/idea/testData/completion/handlers/smart/NullableValue3.kt index 39e3a165e96..f0173db0208 100644 --- a/idea/testData/completion/handlers/smart/NullableValue3.kt +++ b/idea/testData/completion/handlers/smart/NullableValue3.kt @@ -1,5 +1,5 @@ class K { - class object { + default object { fun bar(): K? = K() } } diff --git a/idea/testData/completion/handlers/smart/NullableValue3.kt.after b/idea/testData/completion/handlers/smart/NullableValue3.kt.after index dcebcc886e1..32af89ff7ba 100644 --- a/idea/testData/completion/handlers/smart/NullableValue3.kt.after +++ b/idea/testData/completion/handlers/smart/NullableValue3.kt.after @@ -1,5 +1,5 @@ class K { - class object { + default object { fun bar(): K? = K() } } diff --git a/idea/testData/completion/injava/mockLib/main.kt b/idea/testData/completion/injava/mockLib/main.kt index 2bb79a7bcef..4280ff372da 100644 --- a/idea/testData/completion/injava/mockLib/main.kt +++ b/idea/testData/completion/injava/mockLib/main.kt @@ -4,7 +4,7 @@ public class LibClass { public fun foo() { } - class object { + default object { fun classObjectFun() { } @@ -40,9 +40,9 @@ public fun String.topLevelExtFunction(): String = "" public var topLevelVar: String = "" class F() { - class object { + default object { class F { - class object { + default object { object F { } } diff --git a/idea/testData/completion/smart/ClassObjectMembers.kt b/idea/testData/completion/smart/ClassObjectMembers.kt index 4bc4684108c..60de4d6b01e 100644 --- a/idea/testData/completion/smart/ClassObjectMembers.kt +++ b/idea/testData/completion/smart/ClassObjectMembers.kt @@ -1,7 +1,7 @@ package sample class K { - class object { + default object { val foo: K = K() fun bar(): K = K() val x: String = "" diff --git a/idea/testData/completion/smart/ClassObjectMembersForNullable.kt b/idea/testData/completion/smart/ClassObjectMembersForNullable.kt index a94c621a2c1..b2debe5a8ec 100644 --- a/idea/testData/completion/smart/ClassObjectMembersForNullable.kt +++ b/idea/testData/completion/smart/ClassObjectMembersForNullable.kt @@ -1,7 +1,7 @@ package sample class K { - class object { + default object { val foo: K = K() fun bar(): K = K() val x: String = "" diff --git a/idea/testData/completion/smart/ClassObjectMembersWithPrefix.kt b/idea/testData/completion/smart/ClassObjectMembersWithPrefix.kt index 14c59aa3f6a..6ead0af43f5 100644 --- a/idea/testData/completion/smart/ClassObjectMembersWithPrefix.kt +++ b/idea/testData/completion/smart/ClassObjectMembersWithPrefix.kt @@ -1,7 +1,7 @@ package sample class Kool { - class object { + default object { val foo: Kool = Kool() fun bar(): Kool = Kool() } diff --git a/idea/testData/completion/smart/InClassObject.kt b/idea/testData/completion/smart/InClassObject.kt index 93551c75ba0..dc900054b6d 100644 --- a/idea/testData/completion/smart/InClassObject.kt +++ b/idea/testData/completion/smart/InClassObject.kt @@ -1,5 +1,5 @@ class C { - class object { + default object { fun foo(): C { return } diff --git a/idea/testData/completion/smart/NoExtensionMethodFromClassObject.kt b/idea/testData/completion/smart/NoExtensionMethodFromClassObject.kt index 3f1dd895184..677dcb80b90 100644 --- a/idea/testData/completion/smart/NoExtensionMethodFromClassObject.kt +++ b/idea/testData/completion/smart/NoExtensionMethodFromClassObject.kt @@ -1,5 +1,5 @@ class X { - class object { + default object { fun String.f(): X = X() fun g(): X = X() } diff --git a/idea/testData/completion/smart/functionReference/10.kt b/idea/testData/completion/smart/functionReference/10.kt index 90a089e4593..752b602c99d 100644 --- a/idea/testData/completion/smart/functionReference/10.kt +++ b/idea/testData/completion/smart/functionReference/10.kt @@ -5,7 +5,7 @@ class C { listOf("a").filter() } - class object { + default object { fun staticFoo(s: String): Boolean = true } } diff --git a/idea/testData/completion/smart/generics/GenericFunction5.kt b/idea/testData/completion/smart/generics/GenericFunction5.kt index a9eef6b1664..5789702c234 100644 --- a/idea/testData/completion/smart/generics/GenericFunction5.kt +++ b/idea/testData/completion/smart/generics/GenericFunction5.kt @@ -1,5 +1,5 @@ class C { - class object { + default object { fun create(t: T): C{} } } diff --git a/idea/testData/completion/weighers/smart/NoNameSimilarityForQualifier.kt b/idea/testData/completion/weighers/smart/NoNameSimilarityForQualifier.kt index ff4f506c7c7..baeb6cdff0d 100644 --- a/idea/testData/completion/weighers/smart/NoNameSimilarityForQualifier.kt +++ b/idea/testData/completion/weighers/smart/NoNameSimilarityForQualifier.kt @@ -1,5 +1,5 @@ class Name { - class object { + default object { fun create(): Name = Name() } } diff --git a/idea/testData/completion/weighers/smart/NullableExpected.kt b/idea/testData/completion/weighers/smart/NullableExpected.kt index 388e7843b97..e9e55c0e2ed 100644 --- a/idea/testData/completion/weighers/smart/NullableExpected.kt +++ b/idea/testData/completion/weighers/smart/NullableExpected.kt @@ -1,7 +1,7 @@ var global: C = C() abstract class C { - class object { + default object { val INSTANCE = C() } } diff --git a/idea/testData/completion/weighers/smart/SmartPriority2.kt b/idea/testData/completion/weighers/smart/SmartPriority2.kt index cce9b1dab4e..0f7f51efefd 100644 --- a/idea/testData/completion/weighers/smart/SmartPriority2.kt +++ b/idea/testData/completion/weighers/smart/SmartPriority2.kt @@ -3,7 +3,7 @@ var nullableX: C? = null var nullableFoo: C? = null abstract class C { - class object { + default object { val INSTANCE_X = C() val INSTANCE_FOO = C() } diff --git a/idea/testData/copyPaste/imports/AlreadyImportedViaStar.kt b/idea/testData/copyPaste/imports/AlreadyImportedViaStar.kt index af1635b3e9f..2b56a62b6d5 100644 --- a/idea/testData/copyPaste/imports/AlreadyImportedViaStar.kt +++ b/idea/testData/copyPaste/imports/AlreadyImportedViaStar.kt @@ -40,7 +40,7 @@ class Outer { } class ClassObject { - class object { + default object { } } diff --git a/idea/testData/copyPaste/imports/ClassObject.kt b/idea/testData/copyPaste/imports/ClassObject.kt index 945042da459..c4e6b3d3297 100644 --- a/idea/testData/copyPaste/imports/ClassObject.kt +++ b/idea/testData/copyPaste/imports/ClassObject.kt @@ -3,12 +3,12 @@ package a trait T class A { - class object: T { + default object: T { } } class B { - class object { + default object { fun f(): Int } } diff --git a/idea/testData/copyPaste/imports/ClassObjectFunInsideClass.kt b/idea/testData/copyPaste/imports/ClassObjectFunInsideClass.kt index 99238aab866..bb6b9ec3fc4 100644 --- a/idea/testData/copyPaste/imports/ClassObjectFunInsideClass.kt +++ b/idea/testData/copyPaste/imports/ClassObjectFunInsideClass.kt @@ -7,7 +7,7 @@ class A { f() } - class object { + default object { fun f() } } \ No newline at end of file diff --git a/idea/testData/copyPaste/imports/ClassObjectInner.kt b/idea/testData/copyPaste/imports/ClassObjectInner.kt index 8edb31eeadd..0b0fbba96ef 100644 --- a/idea/testData/copyPaste/imports/ClassObjectInner.kt +++ b/idea/testData/copyPaste/imports/ClassObjectInner.kt @@ -7,7 +7,7 @@ import a.Outer.Default.NestedTrait import a.Outer.Default.NestedAnnotation class Outer { - class object { + default object { class Nested { } enum class NestedEnum { diff --git a/idea/testData/copyPaste/imports/ClassResolvedToPackage.kt b/idea/testData/copyPaste/imports/ClassResolvedToPackage.kt index c32a516a7e8..0118b9dc820 100644 --- a/idea/testData/copyPaste/imports/ClassResolvedToPackage.kt +++ b/idea/testData/copyPaste/imports/ClassResolvedToPackage.kt @@ -1,7 +1,7 @@ package a class a { - class object { + default object { } } diff --git a/idea/testData/copyPaste/imports/ImportDependency.dependency.kt b/idea/testData/copyPaste/imports/ImportDependency.dependency.kt index f1fc50fd660..bbcc0f19164 100644 --- a/idea/testData/copyPaste/imports/ImportDependency.dependency.kt +++ b/idea/testData/copyPaste/imports/ImportDependency.dependency.kt @@ -37,6 +37,6 @@ class Outer { } class ClassObject { - class object { + default object { } } \ No newline at end of file diff --git a/idea/testData/copyPaste/imports/KotlinLibrary/Dependency.kt b/idea/testData/copyPaste/imports/KotlinLibrary/Dependency.kt index c2ffe6e49ed..a4cb923f2d9 100644 --- a/idea/testData/copyPaste/imports/KotlinLibrary/Dependency.kt +++ b/idea/testData/copyPaste/imports/KotlinLibrary/Dependency.kt @@ -38,6 +38,6 @@ class Outer { } class ClassObject { - class object { + default object { } } \ No newline at end of file diff --git a/idea/testData/copyPaste/imports/NoImportForSamePackage.kt b/idea/testData/copyPaste/imports/NoImportForSamePackage.kt index ad68e38182e..03e58235fcc 100644 --- a/idea/testData/copyPaste/imports/NoImportForSamePackage.kt +++ b/idea/testData/copyPaste/imports/NoImportForSamePackage.kt @@ -40,7 +40,7 @@ class Outer { } class ClassObject { - class object { + default object { } } diff --git a/idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.expected.kt b/idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.expected.kt index 19a4995e166..a2916de0987 100644 --- a/idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.expected.kt +++ b/idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.expected.kt @@ -19,7 +19,7 @@ object O2 { } class ClassObject { - class object { + default object { } } diff --git a/idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.kt b/idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.kt index 5ae0387cb27..691ce42122b 100644 --- a/idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.kt +++ b/idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.kt @@ -19,7 +19,7 @@ object O2 { } class ClassObject { - class object { + default object { } } diff --git a/idea/testData/debugger/positionManager/classObject.kt b/idea/testData/debugger/positionManager/classObject.kt index fc8baf791f7..b9d6342f885 100644 --- a/idea/testData/debugger/positionManager/classObject.kt +++ b/idea/testData/debugger/positionManager/classObject.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { { 1 + 1 // A @@ -37,7 +37,7 @@ class A { } trait T { - class object { + default object { val prop = 1 // T\$Default } } diff --git a/idea/testData/debugger/tinyApp/outs/frameClassObject.out b/idea/testData/debugger/tinyApp/outs/frameClassObject.out index 09c50e6552b..ff9a01ed860 100644 --- a/idea/testData/debugger/tinyApp/outs/frameClassObject.out +++ b/idea/testData/debugger/tinyApp/outs/frameClassObject.out @@ -11,7 +11,7 @@ fun main(args: Array) { } class A { - class object { + default object { val prop = 1 fun myFun() = 1 } diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/classObjectVal.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/classObjectVal.kt index 4c354387a30..b59deb0b55e 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/classObjectVal.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/classObjectVal.kt @@ -10,7 +10,7 @@ class MyClass { val a = 1 } - class object { + default object { val coProp = 1 } } diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/dependentOnFile.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/dependentOnFile.kt index 8fd781bf716..ec07211032b 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/dependentOnFile.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/dependentOnFile.kt @@ -8,7 +8,7 @@ fun main(args: Array) { class TestClass { fun testFun() = 1 - class object { + default object { val p = 1 } } diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.kt index d0765506d2d..815a2cbdd65 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.kt @@ -5,7 +5,7 @@ fun main(args: Array) { } class A { - class object { + default object { val prop = 1 fun myFun() = 1 } diff --git a/idea/testData/debugger/tinyApp/src/stepInto/stepInto/accessors.kt b/idea/testData/debugger/tinyApp/src/stepInto/stepInto/accessors.kt index 83945ae90f7..a219609db10 100644 --- a/idea/testData/debugger/tinyApp/src/stepInto/stepInto/accessors.kt +++ b/idea/testData/debugger/tinyApp/src/stepInto/stepInto/accessors.kt @@ -12,7 +12,7 @@ class A { prop = 2 } - class object { + default object { private fun foo() { val a = 1 } diff --git a/idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt b/idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt index 929a06553f1..8414a8c7443 100644 --- a/idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt +++ b/idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt @@ -31,7 +31,7 @@ class A { f() } - class object { + default object { fun test() { lambda { val a = 1 diff --git a/idea/testData/debugger/tinyApp/src/stepInto/stepIntoAndSmartStepInto/classObjectFunFromClass.kt b/idea/testData/debugger/tinyApp/src/stepInto/stepIntoAndSmartStepInto/classObjectFunFromClass.kt index 742e278f1ce..b820bcfdd1c 100644 --- a/idea/testData/debugger/tinyApp/src/stepInto/stepIntoAndSmartStepInto/classObjectFunFromClass.kt +++ b/idea/testData/debugger/tinyApp/src/stepInto/stepIntoAndSmartStepInto/classObjectFunFromClass.kt @@ -6,7 +6,7 @@ class A { foo() } - class object { + default object { fun foo() { val a = 1 } diff --git a/idea/testData/debugger/tinyApp/src/stepInto/stepIntoAndSmartStepInto/classObjectFunFromTopLevel.kt b/idea/testData/debugger/tinyApp/src/stepInto/stepIntoAndSmartStepInto/classObjectFunFromTopLevel.kt index af64801ecf0..671b8331869 100644 --- a/idea/testData/debugger/tinyApp/src/stepInto/stepIntoAndSmartStepInto/classObjectFunFromTopLevel.kt +++ b/idea/testData/debugger/tinyApp/src/stepInto/stepIntoAndSmartStepInto/classObjectFunFromTopLevel.kt @@ -1,7 +1,7 @@ package classObjectFunFromTopLevel class A { - class object { + default object { fun bar() { val a = 1 } diff --git a/idea/testData/decompiler/decompiledText/ClassWithClassObject.expected.kt b/idea/testData/decompiler/decompiledText/ClassWithClassObject.expected.kt index da625e6e2b8..f25087928a6 100644 --- a/idea/testData/decompiler/decompiledText/ClassWithClassObject.expected.kt +++ b/idea/testData/decompiler/decompiledText/ClassWithClassObject.expected.kt @@ -4,7 +4,7 @@ package test internal final class ClassWithClassObject() { - internal class object { + internal default object { internal final val a: test.A /* compiled code */ public final var b: test.B /* compiled code */ diff --git a/idea/testData/decompiler/decompiledText/ClassWithClassObject/ClassWithClassObject.kt b/idea/testData/decompiler/decompiledText/ClassWithClassObject/ClassWithClassObject.kt index 40a40cd6aa2..9079b25337b 100644 --- a/idea/testData/decompiler/decompiledText/ClassWithClassObject/ClassWithClassObject.kt +++ b/idea/testData/decompiler/decompiledText/ClassWithClassObject/ClassWithClassObject.kt @@ -4,7 +4,7 @@ class ClassWithClassObject { fun f() { } - class object { + default object { fun f() { } diff --git a/idea/testData/decompiler/decompiledText/DependencyOnNestedClasses/Dependency.kt b/idea/testData/decompiler/decompiledText/DependencyOnNestedClasses/Dependency.kt index 2502e0c6823..c7300ab3b5f 100644 --- a/idea/testData/decompiler/decompiledText/DependencyOnNestedClasses/Dependency.kt +++ b/idea/testData/decompiler/decompiledText/DependencyOnNestedClasses/Dependency.kt @@ -8,7 +8,7 @@ class D { class Nested } - class object { + default object { class NestedInClassObject } } diff --git a/idea/testData/decompiler/navigation/decompiled/WithInnerAndObject.kt b/idea/testData/decompiler/navigation/decompiled/WithInnerAndObject.kt index e271bf21f0f..1a1da414f73 100644 --- a/idea/testData/decompiler/navigation/decompiled/WithInnerAndObject.kt +++ b/idea/testData/decompiler/navigation/decompiled/WithInnerAndObject.kt @@ -4,7 +4,7 @@ package testData.libraries [[public final class WithInnerAndObject() { - [[public class object { + [[public default object { [internal final fun foo(): kotlin.Unit { /* compiled code */ }] }]] diff --git a/idea/testData/decompiler/navigation/decompiled/WithTraitClassObject.kt b/idea/testData/decompiler/navigation/decompiled/WithTraitClassObject.kt index 9fbad9f6611..0ebfc6026ea 100644 --- a/idea/testData/decompiler/navigation/decompiled/WithTraitClassObject.kt +++ b/idea/testData/decompiler/navigation/decompiled/WithTraitClassObject.kt @@ -4,6 +4,6 @@ package testData.libraries [[public final class WithTraitClassObject() { - [[public class object : testData.libraries.SimpleTrait { + [[public default object : testData.libraries.SimpleTrait { }]] }]] diff --git a/idea/testData/decompiler/navigation/library/main.kt b/idea/testData/decompiler/navigation/library/main.kt index 5bce116317d..4295cb9ac00 100644 --- a/idea/testData/decompiler/navigation/library/main.kt +++ b/idea/testData/decompiler/navigation/library/main.kt @@ -10,7 +10,7 @@ public class SimpleTraitImpl : SimpleTrait { } public class WithInnerAndObject { - class object { + default object { fun foo() { } } @@ -23,7 +23,7 @@ public class WithInnerAndObject { } public class WithTraitClassObject { - class object : SimpleTrait + default object : SimpleTrait } public abstract class AbstractClass { diff --git a/idea/testData/decompiler/navigation/usercode/ClassObject.kt b/idea/testData/decompiler/navigation/usercode/ClassObject.kt index 02be51a6eb1..c2c21bc896a 100644 --- a/idea/testData/decompiler/navigation/usercode/ClassObject.kt +++ b/idea/testData/decompiler/navigation/usercode/ClassObject.kt @@ -5,5 +5,5 @@ fun foo() { } // main.kt -// class <1>object { +// default <1>object { // fun <2>foo() { \ No newline at end of file diff --git a/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt b/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt index c791c5253ae..9a6d0f1b9e2 100644 --- a/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt +++ b/idea/testData/decompiler/stubBuilder/Annotations/Annotations.kt @@ -17,7 +17,7 @@ a public class Annotations private [a] (private [a] val c1: Int, [a] val c2: Int [a] private set - private b(E.E2) class object { + private b(E.E2) default object { } } diff --git a/idea/testData/decompiler/stubBuilder/ClassObject/ClassObject.kt b/idea/testData/decompiler/stubBuilder/ClassObject/ClassObject.kt index d33304c304b..e121eeee41e 100644 --- a/idea/testData/decompiler/stubBuilder/ClassObject/ClassObject.kt +++ b/idea/testData/decompiler/stubBuilder/ClassObject/ClassObject.kt @@ -6,7 +6,7 @@ class ClassObject { val c = 1 - public class object { + public default object { val j = 0 fun z() = 0 @@ -20,11 +20,11 @@ class ClassObject { class B { - class object { + default object { class C { - class object { + default object { class D { - class object { + default object { val i = 3 fun f() { } diff --git a/idea/testData/decompiler/stubBuilder/DependencyOnNestedClasses/Dependency.kt b/idea/testData/decompiler/stubBuilder/DependencyOnNestedClasses/Dependency.kt index 2502e0c6823..c7300ab3b5f 100644 --- a/idea/testData/decompiler/stubBuilder/DependencyOnNestedClasses/Dependency.kt +++ b/idea/testData/decompiler/stubBuilder/DependencyOnNestedClasses/Dependency.kt @@ -8,7 +8,7 @@ class D { class Nested } - class object { + default object { class NestedInClassObject } } diff --git a/idea/testData/decompiler/stubBuilder/Enum/Enum.kt b/idea/testData/decompiler/stubBuilder/Enum/Enum.kt index 7062efd2e64..f30e57922d6 100644 --- a/idea/testData/decompiler/stubBuilder/Enum/Enum.kt +++ b/idea/testData/decompiler/stubBuilder/Enum/Enum.kt @@ -7,7 +7,7 @@ enum class Enum { open fun f() = 3 - class object { + default object { val c: Int = 1 } } \ No newline at end of file diff --git a/idea/testData/diagnosticMessage/nestedClassAcessedViaInstanceReference.kt b/idea/testData/diagnosticMessage/nestedClassAcessedViaInstanceReference.kt index 7678aec4244..7afc23e7b2f 100644 --- a/idea/testData/diagnosticMessage/nestedClassAcessedViaInstanceReference.kt +++ b/idea/testData/diagnosticMessage/nestedClassAcessedViaInstanceReference.kt @@ -3,7 +3,7 @@ class A { class Nested() - class NestedWithClassObject { class object } + class NestedWithClassObject { default object } enum class NestedEnum { A } object NestedObj { fun invoke() = 1 } } diff --git a/idea/testData/diagnosticMessage/nestedClassAcessedViaInstanceReference2.txt b/idea/testData/diagnosticMessage/nestedClassAcessedViaInstanceReference2.txt index ed1c56c31a3..6d120ce2d80 100644 --- a/idea/testData/diagnosticMessage/nestedClassAcessedViaInstanceReference2.txt +++ b/idea/testData/diagnosticMessage/nestedClassAcessedViaInstanceReference2.txt @@ -1,2 +1,2 @@ -Nested class object 'Default' accessed via instance reference \ No newline at end of file +Nested default object 'Default' accessed via instance reference \ No newline at end of file diff --git a/idea/testData/diagnosticMessage/nestedClassShouldBeQualified.kt b/idea/testData/diagnosticMessage/nestedClassShouldBeQualified.kt index 8e438632ef6..0debad62f52 100644 --- a/idea/testData/diagnosticMessage/nestedClassShouldBeQualified.kt +++ b/idea/testData/diagnosticMessage/nestedClassShouldBeQualified.kt @@ -15,7 +15,7 @@ fun A.B.test() { } class C { - class object { + default object { class D { class Nested } @@ -29,7 +29,7 @@ fun C.Default.D.text() { class E { class F { - class object + default object } } diff --git a/idea/testData/diagnosticMessage/nestedClassShouldBeQualified5.txt b/idea/testData/diagnosticMessage/nestedClassShouldBeQualified5.txt index c6641f60961..7d109728e1a 100644 --- a/idea/testData/diagnosticMessage/nestedClassShouldBeQualified5.txt +++ b/idea/testData/diagnosticMessage/nestedClassShouldBeQualified5.txt @@ -1,2 +1,2 @@ -Nested class object 'Default' should be qualified as 'E.F.Default' \ No newline at end of file +Nested default object 'Default' should be qualified as 'E.F.Default' \ No newline at end of file diff --git a/idea/testData/editor/optimizeImports/DefaultObjectReference.dependency.kt b/idea/testData/editor/optimizeImports/DefaultObjectReference.dependency.kt index b1ad51eec1b..400f0f53697 100644 --- a/idea/testData/editor/optimizeImports/DefaultObjectReference.dependency.kt +++ b/idea/testData/editor/optimizeImports/DefaultObjectReference.dependency.kt @@ -1,13 +1,13 @@ package d class A { - class object E { + default object E { val c: Int } } class B { - class object F { + default object F { val c: Int } } \ No newline at end of file diff --git a/idea/testData/editor/optimizeImports/Kt2709.kt b/idea/testData/editor/optimizeImports/Kt2709.kt index 41bdf24c094..aa5b06386df 100644 --- a/idea/testData/editor/optimizeImports/Kt2709.kt +++ b/idea/testData/editor/optimizeImports/Kt2709.kt @@ -5,7 +5,7 @@ fun main() { } class MyClass { - class object { + default object { object TEST {} } } diff --git a/idea/testData/editor/optimizeImports/Kt2709.kt.after b/idea/testData/editor/optimizeImports/Kt2709.kt.after index 41bdf24c094..aa5b06386df 100644 --- a/idea/testData/editor/optimizeImports/Kt2709.kt.after +++ b/idea/testData/editor/optimizeImports/Kt2709.kt.after @@ -5,7 +5,7 @@ fun main() { } class MyClass { - class object { + default object { object TEST {} } } diff --git a/idea/testData/editor/optimizeImports/MembersInScope.kt b/idea/testData/editor/optimizeImports/MembersInScope.kt index 0c5f555fa3d..3e17330cf42 100644 --- a/idea/testData/editor/optimizeImports/MembersInScope.kt +++ b/idea/testData/editor/optimizeImports/MembersInScope.kt @@ -13,7 +13,7 @@ class Outer { inner class Inner2 } - class object { + default object { class ClassObjectNested } diff --git a/idea/testData/editor/optimizeImports/MembersInScope.kt.after b/idea/testData/editor/optimizeImports/MembersInScope.kt.after index 15a4c054225..b51e047becc 100644 --- a/idea/testData/editor/optimizeImports/MembersInScope.kt.after +++ b/idea/testData/editor/optimizeImports/MembersInScope.kt.after @@ -10,7 +10,7 @@ class Outer { inner class Inner2 } - class object { + default object { class ClassObjectNested } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.1.kt index 923a2c2112e..ef734eb97b3 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.1.kt @@ -20,7 +20,7 @@ public class X(bar: String? = A.BAR): A() { super.foo() } - class object: A() { + default object: A() { } } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.results.txt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.results.txt index c6809cccfa8..b6c0496f613 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.results.txt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.results.txt @@ -12,7 +12,7 @@ Parameter type (10: 16) fun foo(a: A) { Parameter type (32: 14) fun X.bar(a: A = A()) { Super type qualifier (20: 15) super.foo() Supertype (1: 39) public class X(bar: String? = A.BAR): A() { -Supertype (23: 19) class object: A() { +Supertype (23: 21) default object: A() { Supertype (28: 11) object O: A() { Target type of 'is' operation (37: 24) return if (this is A) this as A else null Usage in cast target type (37: 35) return if (this is A) this as A else null diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.1.kt index 923a2c2112e..ef734eb97b3 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.1.kt @@ -20,7 +20,7 @@ public class X(bar: String? = A.BAR): A() { super.foo() } - class object: A() { + default object: A() { } } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.1.kt index 923a2c2112e..ef734eb97b3 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.1.kt @@ -20,7 +20,7 @@ public class X(bar: String? = A.BAR): A() { super.foo() } - class object: A() { + default object: A() { } } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.results.txt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.results.txt index c491a66770b..342bd765acc 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.results.txt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.results.txt @@ -3,5 +3,5 @@ Function call (7: 11) A.foos() New instance creation (2: 20) var next: A? = A() New instance creation (32: 18) fun X.bar(a: A = A()) { Supertype (1: 39) public class X(bar: String? = A.BAR): A() { -Supertype (23: 19) class object: A() { +Supertype (23: 21) default object: A() { Supertype (28: 11) object O: A() { diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.1.kt index 923a2c2112e..ef734eb97b3 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.1.kt @@ -20,7 +20,7 @@ public class X(bar: String? = A.BAR): A() { super.foo() } - class object: A() { + default object: A() { } } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.results.txt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.results.txt index c6809cccfa8..b6c0496f613 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.results.txt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.results.txt @@ -12,7 +12,7 @@ Parameter type (10: 16) fun foo(a: A) { Parameter type (32: 14) fun X.bar(a: A = A()) { Super type qualifier (20: 15) super.foo() Supertype (1: 39) public class X(bar: String? = A.BAR): A() { -Supertype (23: 19) class object: A() { +Supertype (23: 21) default object: A() { Supertype (28: 11) object O: A() { Target type of 'is' operation (37: 24) return if (this is A) this as A else null Usage in cast target type (37: 35) return if (this is A) this as A else null diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.1.kt index 791da4729ae..e17f6550e40 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.1.kt @@ -20,7 +20,7 @@ public class X(bar: String? = Outer.A.BAR): Outer.A() { super.foo() } - class object: Outer.A() { + default object: Outer.A() { } } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.results.txt b/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.results.txt index d46cb90d8f9..b3dc0c53bd1 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.results.txt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.results.txt @@ -12,7 +12,7 @@ Parameter type (10: 22) fun foo(a: Outer.A) { Parameter type (32: 20) fun X.bar(a: Outer.A = Outer.A()) { Super type qualifier (20: 21) super.foo() Supertype (1: 51) public class X(bar: String? = Outer.A.BAR): Outer.A() { -Supertype (23: 25) class object: Outer.A() { +Supertype (23: 27) default object: Outer.A() { Supertype (28: 17) object O: Outer.A() { Target type of 'is' operation (37: 30) return if (this is Outer.A) this as Outer.A else null Usage in cast target type (37: 47) return if (this is Outer.A) this as Outer.A else null diff --git a/idea/testData/findUsages/kotlin/findClassUsages/classUsedInTextAsRef.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/classUsedInTextAsRef.0.kt index 5431d7dea41..3155d5d80d3 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/classUsedInTextAsRef.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/classUsedInTextAsRef.0.kt @@ -3,7 +3,7 @@ package server open class Server { - class object { + default object { val NAME = "Server" } diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.0.kt index 2dbfa33b9ec..0bfaf3e24fc 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.0.kt @@ -3,7 +3,7 @@ package server open class Server { - class object { + default object { val NAME = "Server" } diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.1.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.1.kt index de27808debe..2dfc6a94991 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.1.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.1.kt @@ -20,7 +20,7 @@ class Client(name: String = Server.NAME): Server() { println("Client") } - class object: Server() { + default object: Server() { } } diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.results.txt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.results.txt index fc834c4aa54..ae619f4c783 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.results.txt @@ -8,7 +8,7 @@ Nested class/object (7: 16) val name = Server.NAME Parameter type (32: 19) fun Client.bar(s: Server = Server.NAME) { Parameter type (9: 16) fun foo(s: Server) { Super type qualifier (19: 15) super.work() -Supertype (23: 19) class object: Server() { +Supertype (23: 21) default object: Server() { Supertype (28: 22) object ClientObject: Server() { Supertype (5: 43) class Client(name: String = Server.NAME): Server() { Target type of 'is' operation (41: 24) return if (this is Server) this as Server else null diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassConstructorUsages.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassConstructorUsages.0.kt index ab35d0f3c4e..b8386c6ca60 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassConstructorUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassConstructorUsages.0.kt @@ -3,7 +3,7 @@ package server open class Server { - class object { + default object { val NAME = "Server" } diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassNonConstructorUsages.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassNonConstructorUsages.0.kt index 5431d7dea41..3155d5d80d3 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassNonConstructorUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassNonConstructorUsages.0.kt @@ -3,7 +3,7 @@ package server open class Server { - class object { + default object { val NAME = "Server" } diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.0.kt index 8d079caebc1..1855bad6c5d 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.0.kt @@ -11,7 +11,7 @@ public open class Outer { } - class object { + default object { public var bar: String = "bar"; public open fun foo() { diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.1.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.1.kt index 13243bcb040..297a56deb81 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.1.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.1.kt @@ -24,7 +24,7 @@ public class X(bar: String? = Inner.A.bar): Inner.A() { super.foo() } - class object: Inner.A() { + default object: Inner.A() { } } diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.results.txt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.results.txt index c4a5517e6b4..cafb9b2a6a7 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.results.txt @@ -13,7 +13,7 @@ New instance creation (6: 32) var next: Inner.A? = Inner.A() Parameter type (14: 22) fun foo(a: Inner.A) { Parameter type (36: 20) fun X.bar(a: Inner.A = Inner.A()) { Super type qualifier (24: 21) super.foo() -Supertype (27: 25) class object: Inner.A() { +Supertype (27: 27) default object: Inner.A() { Supertype (32: 17) object O: Inner.A() { Supertype (5: 51) public class X(bar: String? = Inner.A.bar): Inner.A() { Target type of 'is' operation (41: 30) return if (this is Inner.A) this as Inner.A else null diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.0.kt index 426c4d0872d..958a57be483 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.0.kt @@ -10,7 +10,7 @@ public open class Outer { } - class object { + default object { public var bar: String = "bar"; public open fun foo() { diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.1.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.1.kt index e9a102b2a6a..5acc774265f 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.1.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.1.kt @@ -24,7 +24,7 @@ public class X(bar: String? = Outer.A.bar): Outer.A() { super.foo() } - class object: Outer.A() { + default object: Outer.A() { } } diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.results.txt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.results.txt index 5c3461bab61..79846307ec2 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.results.txt @@ -13,7 +13,7 @@ New instance creation (6: 32) var next: Outer.A? = Outer.A() Parameter type (14: 22) fun foo(a: Outer.A) { Parameter type (36: 20) fun X.bar(a: Outer.A = Outer.A()) { Super type qualifier (24: 21) super.foo() -Supertype (27: 25) class object: Outer.A() { +Supertype (27: 27) default object: Outer.A() { Supertype (32: 17) object O: Outer.A() { Supertype (5: 51) public class X(bar: String? = Outer.A.bar): Outer.A() { Target type of 'is' operation (41: 30) return if (this is Outer.A) this as Outer.A else null diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/javaClassObjectPropertyUsages.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/javaClassObjectPropertyUsages.0.kt index ba9a8b9e78e..c8bfaf79f99 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/javaClassObjectPropertyUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/javaClassObjectPropertyUsages.0.kt @@ -3,7 +3,7 @@ package server class A { - class object { + default object { var foo: String = "foo" } } diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt index 61691726ba4..b5e4e41d632 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt @@ -3,7 +3,7 @@ package server trait Some { - class object { + default object { val XX = 1 } } diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt index f63e089f382..212276028d8 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt @@ -3,7 +3,7 @@ class Outer { val x = Outer.t - class object { + default object { private val t = 1 } } diff --git a/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.0.kt b/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.0.kt index 4d33d788b84..7e35065b9d9 100644 --- a/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.0.kt @@ -4,7 +4,7 @@ package server open class Server { - class object { + default object { val NAME = "Server" } diff --git a/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.1.kt b/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.1.kt index de27808debe..2dfc6a94991 100644 --- a/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.1.kt +++ b/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.1.kt @@ -20,7 +20,7 @@ class Client(name: String = Server.NAME): Server() { println("Client") } - class object: Server() { + default object: Server() { } } diff --git a/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.results.txt b/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.results.txt index ed5f88380fa..a201b60ee1c 100644 --- a/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.results.txt @@ -8,7 +8,7 @@ Nested class/object (bar) (32: 28) fun Client.bar(s: Server = Server.NAME) { Parameter type (Client) (9: 16) fun foo(s: Server) { Parameter type (bar) (32: 19) fun Client.bar(s: Server = Server.NAME) { Super type qualifier (Client) (19: 15) super.work() -Supertype (Client) (23: 19) class object: Server() { +Supertype (Client) (23: 21) default object: Server() { Supertype (Client) (5: 43) class Client(name: String = Server.NAME): Server() { Supertype (ClientObject) (28: 22) object ClientObject: Server() { Target type of 'is' operation (asServer) (41: 24) return if (this is Server) this as Server else null diff --git a/idea/testData/formatter/ClassLineBreak.after.inv.kt b/idea/testData/formatter/ClassLineBreak.after.inv.kt index 8587ae3be2f..9c99df50859 100644 --- a/idea/testData/formatter/ClassLineBreak.after.inv.kt +++ b/idea/testData/formatter/ClassLineBreak.after.inv.kt @@ -1,10 +1,10 @@ class A { - class object { + default object { } } class A { - class object { + default object { } } diff --git a/idea/testData/formatter/ClassLineBreak.after.kt b/idea/testData/formatter/ClassLineBreak.after.kt index c743930a636..699d90a032b 100644 --- a/idea/testData/formatter/ClassLineBreak.after.kt +++ b/idea/testData/formatter/ClassLineBreak.after.kt @@ -1,13 +1,13 @@ class A { - class object + default object { } } class A { - class object + default object { } } diff --git a/idea/testData/formatter/ClassLineBreak.kt b/idea/testData/formatter/ClassLineBreak.kt index 9ca8d1ce8d3..77cf8946a74 100644 --- a/idea/testData/formatter/ClassLineBreak.kt +++ b/idea/testData/formatter/ClassLineBreak.kt @@ -1,11 +1,11 @@ class A { - class object { + default object { } } class A { - class object + default object { } } diff --git a/idea/testData/formatter/EmptyBlocks.after.inv.kt b/idea/testData/formatter/EmptyBlocks.after.inv.kt index 2758eec0453..6c6db921453 100644 --- a/idea/testData/formatter/EmptyBlocks.after.inv.kt +++ b/idea/testData/formatter/EmptyBlocks.after.inv.kt @@ -1,7 +1,7 @@ class Test {} class Other { - class object {} + default object {} } object TestObject {} @@ -21,7 +21,7 @@ class Test1 { } class Other1 { - class object { + default object { } } diff --git a/idea/testData/formatter/EmptyBlocks.kt b/idea/testData/formatter/EmptyBlocks.kt index 2758eec0453..6c6db921453 100644 --- a/idea/testData/formatter/EmptyBlocks.kt +++ b/idea/testData/formatter/EmptyBlocks.kt @@ -1,7 +1,7 @@ class Test {} class Other { - class object {} + default object {} } object TestObject {} @@ -21,7 +21,7 @@ class Test1 { } class Other1 { - class object { + default object { } } diff --git a/idea/testData/formatter/SpaceAroundExtendColonInObjects.after.inv.kt b/idea/testData/formatter/SpaceAroundExtendColonInObjects.after.inv.kt index 57fca849e8d..0ed5cc01abd 100644 --- a/idea/testData/formatter/SpaceAroundExtendColonInObjects.after.inv.kt +++ b/idea/testData/formatter/SpaceAroundExtendColonInObjects.after.inv.kt @@ -18,13 +18,13 @@ val a = object: A {} val b = object: A {} class B { - class object: A { + default object: A { } } class C { - class object: + default object: A { } diff --git a/idea/testData/formatter/SpaceAroundExtendColonInObjects.after.kt b/idea/testData/formatter/SpaceAroundExtendColonInObjects.after.kt index e22ce61ab8f..4e7adeb74e5 100644 --- a/idea/testData/formatter/SpaceAroundExtendColonInObjects.after.kt +++ b/idea/testData/formatter/SpaceAroundExtendColonInObjects.after.kt @@ -18,13 +18,13 @@ val a = object :A {} val b = object :A {} class B { - class object :A { + default object :A { } } class C { - class object : + default object : A { } diff --git a/idea/testData/formatter/SpaceAroundExtendColonInObjects.kt b/idea/testData/formatter/SpaceAroundExtendColonInObjects.kt index f49e87910a2..4d54001b098 100644 --- a/idea/testData/formatter/SpaceAroundExtendColonInObjects.kt +++ b/idea/testData/formatter/SpaceAroundExtendColonInObjects.kt @@ -18,13 +18,13 @@ val a = object:A {} val b = object : A {} class B { - class object:A { + default object:A { } } class C { - class object : + default object : A { } diff --git a/idea/testData/hierarchy/calls/callers/kotlinClass/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinClass/main0.kt index 3562b15fc97..6ec4c3df85c 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinClass/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinClass/main0.kt @@ -12,7 +12,7 @@ class KClient { KA() } - class object { + default object { val a = KA() } diff --git a/idea/testData/hierarchy/calls/callers/kotlinFunction/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinFunction/main0.kt index 114dd8449f8..746419a7b43 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinFunction/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinFunction/main0.kt @@ -17,7 +17,7 @@ class KClient { KBase().foo("") } - class object { + default object { val a = KBase().foo("") + KA().foo("") } diff --git a/idea/testData/hierarchy/calls/callers/kotlinNestedClass/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinNestedClass/main0.kt index 4d7c0cbe47f..1de759015cd 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinNestedClass/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinNestedClass/main0.kt @@ -14,7 +14,7 @@ class KClient { T.KA() } - class object { + default object { val a = T.KA() } diff --git a/idea/testData/hierarchy/calls/callers/kotlinNestedInnerClass/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinNestedInnerClass/main0.kt index b5d0facd385..9f9fe80b725 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinNestedInnerClass/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinNestedInnerClass/main0.kt @@ -14,7 +14,7 @@ class KClient { T().KA() } - class object { + default object { val a = T().KA() } diff --git a/idea/testData/hierarchy/calls/callers/kotlinPackageFunction/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinPackageFunction/main0.kt index eb199f52f35..b358478a34f 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinPackageFunction/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinPackageFunction/main0.kt @@ -7,7 +7,7 @@ class KClient { packageFun("") } - class object { + default object { val a = packageFun("") } diff --git a/idea/testData/hierarchy/calls/callers/kotlinPackageProperty/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinPackageProperty/main0.kt index 6653c0ab4da..4c99a26d4d8 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinPackageProperty/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinPackageProperty/main0.kt @@ -7,7 +7,7 @@ class KClient { packageVal = "" } - class object { + default object { val a = packageVal } diff --git a/idea/testData/hierarchy/calls/callers/kotlinProperty/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinProperty/main0.kt index 4bc20bd0f5e..b9242cc467f 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinProperty/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinProperty/main0.kt @@ -17,7 +17,7 @@ class KClient { KA().name = "" } - class object { + default object { val a = KBase().name + KA().name } diff --git a/idea/testData/hierarchy/class/type/ClassInClassObject/main.kt b/idea/testData/hierarchy/class/type/ClassInClassObject/main.kt index 8de59dac67f..bcfc65abca2 100644 --- a/idea/testData/hierarchy/class/type/ClassInClassObject/main.kt +++ b/idea/testData/hierarchy/class/type/ClassInClassObject/main.kt @@ -1,5 +1,5 @@ class A { - class object { + default object { class MyClass } } diff --git a/idea/testData/highlighter/deprecated/ClassObject.kt b/idea/testData/highlighter/deprecated/ClassObject.kt index b5a68f2f35c..43e4ea6967c 100644 --- a/idea/testData/highlighter/deprecated/ClassObject.kt +++ b/idea/testData/highlighter/deprecated/ClassObject.kt @@ -13,13 +13,13 @@ fun test() { } class MyClass(): MyTrait { - deprecated("Use A instead") class object { + deprecated("Use A instead") default object { val test: String = "" } } trait MyTrait { - deprecated("Use A instead") class object { + deprecated("Use A instead") default object { val test: String = "" } } diff --git a/idea/testData/highlighter/deprecated/Function.kt b/idea/testData/highlighter/deprecated/Function.kt index f481684663a..99b73193f01 100644 --- a/idea/testData/highlighter/deprecated/Function.kt +++ b/idea/testData/highlighter/deprecated/Function.kt @@ -12,7 +12,7 @@ deprecated("Use A instead") fun test4(x: Int, y: Int) { x + y } class MyClass() { deprecated("Use A instead") fun test2() {} - class object { + default object { deprecated("Use A instead") fun test3() {} } } diff --git a/idea/testData/highlighter/deprecated/Property.kt b/idea/testData/highlighter/deprecated/Property.kt index 016525d165d..9d790b89183 100644 --- a/idea/testData/highlighter/deprecated/Property.kt +++ b/idea/testData/highlighter/deprecated/Property.kt @@ -15,7 +15,7 @@ class MyClass() { deprecated("Use A instead") val test2: String = "" deprecated("Use A instead") var test5: String = "" - class object { + default object { deprecated("Use A instead") val test3: String = "" deprecated("Use A instead") var test6: String = "" } diff --git a/idea/testData/inspections/unusedSymbol/object/defaultObject.kt b/idea/testData/inspections/unusedSymbol/object/defaultObject.kt index 5f852bfed23..c7c89847fd1 100644 --- a/idea/testData/inspections/unusedSymbol/object/defaultObject.kt +++ b/idea/testData/inspections/unusedSymbol/object/defaultObject.kt @@ -1,17 +1,17 @@ package defaultObject class A { - class object { + default object { } } class B { - class object NamedUnused { + default object NamedUnused { } } class C { - class object NamedUsed { + default object NamedUsed { } } diff --git a/idea/testData/javaFacade/classObject.kt b/idea/testData/javaFacade/classObject.kt index 3f78d7c9c89..e5906c3c908 100644 --- a/idea/testData/javaFacade/classObject.kt +++ b/idea/testData/javaFacade/classObject.kt @@ -1,7 +1,7 @@ package foo class TheClass() { - class object { + default object { val out = System.out } } \ No newline at end of file diff --git a/idea/testData/javaFacade/classWithObjectLiteralInClassObjectField.kt b/idea/testData/javaFacade/classWithObjectLiteralInClassObjectField.kt index 35fc26be02f..ac557f0f72f 100644 --- a/idea/testData/javaFacade/classWithObjectLiteralInClassObjectField.kt +++ b/idea/testData/javaFacade/classWithObjectLiteralInClassObjectField.kt @@ -3,7 +3,7 @@ package test trait A class B { - class object { + default object { fun bar() = object : A { } } } diff --git a/idea/testData/javaFacade/wrapFunInClassObject.kt b/idea/testData/javaFacade/wrapFunInClassObject.kt index cddbdf5de22..0bb499734d2 100644 --- a/idea/testData/javaFacade/wrapFunInClassObject.kt +++ b/idea/testData/javaFacade/wrapFunInClassObject.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { fun testing() { } } diff --git a/idea/testData/kotlinAndJavaChecker/ClassObjects.kt b/idea/testData/kotlinAndJavaChecker/ClassObjects.kt index eaa99622492..967686ced7e 100644 --- a/idea/testData/kotlinAndJavaChecker/ClassObjects.kt +++ b/idea/testData/kotlinAndJavaChecker/ClassObjects.kt @@ -1,5 +1,5 @@ class WithClassObject { - class object { + default object { fun foo() {} val value: Int = 0 diff --git a/idea/testData/navigation/gotoClass/inClassObject.kt b/idea/testData/navigation/gotoClass/inClassObject.kt index dc4b476d25b..b253c4ad786 100644 --- a/idea/testData/navigation/gotoClass/inClassObject.kt +++ b/idea/testData/navigation/gotoClass/inClassObject.kt @@ -1,7 +1,7 @@ package test class InClassObject { - class object { + default object { class ClassObjectClass {} trait ClassObjectTrait {} diff --git a/idea/testData/navigation/gotoSymbol/properties.kt b/idea/testData/navigation/gotoSymbol/properties.kt index b300f00f71e..9eda6b9924f 100644 --- a/idea/testData/navigation/gotoSymbol/properties.kt +++ b/idea/testData/navigation/gotoSymbol/properties.kt @@ -11,7 +11,7 @@ trait SomeTrait { class Some() { val testInClass = 12 - class object { + default object { val testInClassObject = 12 } } diff --git a/idea/testData/parameterInfo/functionParameterInfo/ExtensionOnClassObject.kt b/idea/testData/parameterInfo/functionParameterInfo/ExtensionOnClassObject.kt index b0518380e04..cc5c106ea96 100644 --- a/idea/testData/parameterInfo/functionParameterInfo/ExtensionOnClassObject.kt +++ b/idea/testData/parameterInfo/functionParameterInfo/ExtensionOnClassObject.kt @@ -3,7 +3,7 @@ trait A fun A.foo(i: Int) = i class B { - class object : A + default object : A } fun test() { diff --git a/idea/testData/quickfix/autoImports/importInFirstPartInQualifiedExpression.before.data.Sample.kt b/idea/testData/quickfix/autoImports/importInFirstPartInQualifiedExpression.before.data.Sample.kt index 944e1c7d7ac..0a6fc962742 100644 --- a/idea/testData/quickfix/autoImports/importInFirstPartInQualifiedExpression.before.data.Sample.kt +++ b/idea/testData/quickfix/autoImports/importInFirstPartInQualifiedExpression.before.data.Sample.kt @@ -1,7 +1,7 @@ package some public class Some { - class object { + default object { public fun test() { } } diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/afterFunOnClassObject.kt b/idea/testData/quickfix/createFromUsage/createFunction/call/afterFunOnClassObject.kt index 20d5662b5fd..b38e9522b58 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/afterFunOnClassObject.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/afterFunOnClassObject.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class A(val n: T) { - class object { + default object { fun foo(i: Int): Int { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/beforeFunOnClassObject.kt b/idea/testData/quickfix/createFromUsage/createFunction/call/beforeFunOnClassObject.kt index 2effa2c6953..3d1a2f3b1c7 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/beforeFunOnClassObject.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/beforeFunOnClassObject.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class A(val n: T) { - class object { + default object { } } diff --git a/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInAccessorInClassObject.kt b/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInAccessorInClassObject.kt index 2579e8a8327..f84624897bc 100644 --- a/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInAccessorInClassObject.kt +++ b/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInAccessorInClassObject.kt @@ -5,7 +5,7 @@ // ERROR: Unresolved reference: foo class A { - class object { + default object { val test: Int get() { return foo } diff --git a/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInClassObjectInitializer.kt b/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInClassObjectInitializer.kt index e6b9e00850e..497be5f05b9 100644 --- a/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInClassObjectInitializer.kt +++ b/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInClassObjectInitializer.kt @@ -5,7 +5,7 @@ // ERROR: Unresolved reference: foo class A { - class object { + default object { { val t: Int = foo } diff --git a/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInPropertyInitializerInClassObject.kt b/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInPropertyInitializerInClassObject.kt index 6401290994d..ded59f39be9 100644 --- a/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInPropertyInitializerInClassObject.kt +++ b/idea/testData/quickfix/createFromUsage/createVariable/parameter/beforeInPropertyInitializerInClassObject.kt @@ -3,7 +3,7 @@ // ERROR: Unresolved reference: foo class A { - class object { + default object { val test: Int = foo } } \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createVariable/property/afterValOnClassObject.kt b/idea/testData/quickfix/createFromUsage/createVariable/property/afterValOnClassObject.kt index a2d3b804929..7f1f60c2f47 100644 --- a/idea/testData/quickfix/createFromUsage/createVariable/property/afterValOnClassObject.kt +++ b/idea/testData/quickfix/createFromUsage/createVariable/property/afterValOnClassObject.kt @@ -2,7 +2,7 @@ // ERROR: Property must be initialized or be abstract class A(val n: T) { - class object { + default object { val foo: Int } diff --git a/idea/testData/quickfix/createFromUsage/createVariable/property/beforeValOnClassObject.kt b/idea/testData/quickfix/createFromUsage/createVariable/property/beforeValOnClassObject.kt index b9bad33296a..113e29ead1a 100644 --- a/idea/testData/quickfix/createFromUsage/createVariable/property/beforeValOnClassObject.kt +++ b/idea/testData/quickfix/createFromUsage/createVariable/property/beforeValOnClassObject.kt @@ -2,7 +2,7 @@ // ERROR: Property must be initialized or be abstract class A(val n: T) { - class object { + default object { } } diff --git a/idea/testData/quickfix/suppress/declarationKinds/afterClassObject.kt b/idea/testData/quickfix/suppress/declarationKinds/afterClassObject.kt index 593b6872e26..28d80ce417c 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/afterClassObject.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/afterClassObject.kt @@ -1,8 +1,8 @@ -// "Suppress 'REDUNDANT_NULLABLE' for class object Default of C" "true" +// "Suppress 'REDUNDANT_NULLABLE' for default object Default of C" "true" class C { [suppress("REDUNDANT_NULLABLE")] - class object { + default object { var foo: String?? = null } } \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/declarationKinds/beforeClassObject.kt b/idea/testData/quickfix/suppress/declarationKinds/beforeClassObject.kt index c6b058626b9..0613b412776 100644 --- a/idea/testData/quickfix/suppress/declarationKinds/beforeClassObject.kt +++ b/idea/testData/quickfix/suppress/declarationKinds/beforeClassObject.kt @@ -1,7 +1,7 @@ -// "Suppress 'REDUNDANT_NULLABLE' for class object Default of C" "true" +// "Suppress 'REDUNDANT_NULLABLE' for default object Default of C" "true" class C { - class object { + default object { var foo: String?? = null } } \ No newline at end of file diff --git a/idea/testData/refactoring/extractFunction/basic/privateMemberInClassObject.kt b/idea/testData/refactoring/extractFunction/basic/privateMemberInClassObject.kt index 3b46b6cbb10..6e2b1e7aa0c 100644 --- a/idea/testData/refactoring/extractFunction/basic/privateMemberInClassObject.kt +++ b/idea/testData/refactoring/extractFunction/basic/privateMemberInClassObject.kt @@ -1,6 +1,6 @@ // SIBLING: public class A { - class object { + default object { private val t: Int = 1 } fun f() { diff --git a/idea/testData/refactoring/extractFunction/parameters/misc/classObject.kt b/idea/testData/refactoring/extractFunction/parameters/misc/classObject.kt index ec5a009f4a5..a7b176a6eac 100644 --- a/idea/testData/refactoring/extractFunction/parameters/misc/classObject.kt +++ b/idea/testData/refactoring/extractFunction/parameters/misc/classObject.kt @@ -5,7 +5,7 @@ class MyClass { return coProp + 10 } - class object { + default object { val coProp = 1 fun coFun() { diff --git a/idea/testData/refactoring/extractFunction/parameters/misc/classObject.kt.after b/idea/testData/refactoring/extractFunction/parameters/misc/classObject.kt.after index 7749a5bb993..661ff135b24 100644 --- a/idea/testData/refactoring/extractFunction/parameters/misc/classObject.kt.after +++ b/idea/testData/refactoring/extractFunction/parameters/misc/classObject.kt.after @@ -4,7 +4,7 @@ class MyClass { return i() } - class object { + default object { val coProp = 1 fun coFun() { diff --git a/idea/testData/refactoring/extractFunction/parameters/misc/innerClassObject.kt b/idea/testData/refactoring/extractFunction/parameters/misc/innerClassObject.kt index 62d3a2eb1b3..1a075b98c86 100644 --- a/idea/testData/refactoring/extractFunction/parameters/misc/innerClassObject.kt +++ b/idea/testData/refactoring/extractFunction/parameters/misc/innerClassObject.kt @@ -6,7 +6,7 @@ class A { return coProp + 10 } - class object { + default object { val coProp = 1 fun coFun() { diff --git a/idea/testData/refactoring/extractFunction/parameters/misc/innerClassObject.kt.after b/idea/testData/refactoring/extractFunction/parameters/misc/innerClassObject.kt.after index 9ed66f675fe..8bc628bdc13 100644 --- a/idea/testData/refactoring/extractFunction/parameters/misc/innerClassObject.kt.after +++ b/idea/testData/refactoring/extractFunction/parameters/misc/innerClassObject.kt.after @@ -5,7 +5,7 @@ class A { return i() } - class object { + default object { val coProp = 1 fun coFun() { diff --git a/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedClassObject.kt b/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedClassObject.kt index 2531a28bcde..3653bf1bc54 100644 --- a/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedClassObject.kt +++ b/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedClassObject.kt @@ -6,7 +6,7 @@ class MyClass { } public class P { - class object { + default object { val a = 1 fun foo() = 1 } diff --git a/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedClassObject.kt.after b/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedClassObject.kt.after index 3df31d608c4..51348928b66 100644 --- a/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedClassObject.kt.after +++ b/idea/testData/refactoring/extractFunction/parameters/misc/qualifiedClassObject.kt.after @@ -5,7 +5,7 @@ class MyClass { } public class P { - class object { + default object { val a = 1 fun foo() = 1 } diff --git a/idea/testData/refactoring/inline/property/ClassObjectProperty.kt b/idea/testData/refactoring/inline/property/ClassObjectProperty.kt index c9147d3eb24..49e6db7074f 100644 --- a/idea/testData/refactoring/inline/property/ClassObjectProperty.kt +++ b/idea/testData/refactoring/inline/property/ClassObjectProperty.kt @@ -1,5 +1,5 @@ class Class { - class object { + default object { val p = 239 } } diff --git a/idea/testData/refactoring/inline/property/ClassObjectProperty.kt.after b/idea/testData/refactoring/inline/property/ClassObjectProperty.kt.after index 35c93f86c9a..22d696ec7ca 100644 --- a/idea/testData/refactoring/inline/property/ClassObjectProperty.kt.after +++ b/idea/testData/refactoring/inline/property/ClassObjectProperty.kt.after @@ -1,5 +1,5 @@ class Class { - class object { + default object { } } diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/after/library/KtClass.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/after/library/KtClass.kt index 6977ba6ebe2..50092201270 100644 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/after/library/KtClass.kt +++ b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/after/library/KtClass.kt @@ -2,19 +2,19 @@ package library class KtClass { class Inner { - class object { + default object { fun foo(): Int = 1 } } - class object { + default object { fun foo(): Int = 1 } } object KtObject { class Inner { - class object { + default object { fun foo(): Int = 1 } } diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/after/source/Foo.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/after/source/Foo.kt index b44781436e9..22d7a468271 100644 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/after/source/Foo.kt +++ b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/after/source/Foo.kt @@ -3,7 +3,7 @@ package source import library.* class Bar { - class object { + default object { val c : Int } } \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/before/library/KtClass.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/before/library/KtClass.kt index 6977ba6ebe2..50092201270 100644 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/before/library/KtClass.kt +++ b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/before/library/KtClass.kt @@ -2,19 +2,19 @@ package library class KtClass { class Inner { - class object { + default object { fun foo(): Int = 1 } } - class object { + default object { fun foo(): Int = 1 } } object KtObject { class Inner { - class object { + default object { fun foo(): Int = 1 } } diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/before/source/Foo.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/before/source/Foo.kt index ef43945e943..ea7c7681eec 100644 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/before/source/Foo.kt +++ b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/before/source/Foo.kt @@ -21,7 +21,7 @@ class Foo { } class Bar { - class object { + default object { val c : Int } } \ No newline at end of file diff --git a/idea/testData/resolve/referenceInJava/ClassObjectField.java b/idea/testData/resolve/referenceInJava/ClassObjectField.java index 2c3257ee933..d6d272091af 100644 --- a/idea/testData/resolve/referenceInJava/ClassObjectField.java +++ b/idea/testData/resolve/referenceInJava/ClassObjectField.java @@ -4,4 +4,4 @@ public class ClassObjectField { } } -// REF: class object of (k).ClassWithClassObject +// REF: default object of (k).ClassWithClassObject diff --git a/idea/testData/resolve/referenceInJava/DeprecatedClassObjectField.java b/idea/testData/resolve/referenceInJava/DeprecatedClassObjectField.java index fa8a730dae7..1ac0004f115 100644 --- a/idea/testData/resolve/referenceInJava/DeprecatedClassObjectField.java +++ b/idea/testData/resolve/referenceInJava/DeprecatedClassObjectField.java @@ -4,4 +4,4 @@ public class ClassObjectField { } } -// REF: class object of (k).ClassWithClassObject +// REF: default object of (k).ClassWithClassObject diff --git a/idea/testData/resolve/referenceInJava/dependencies.kt b/idea/testData/resolve/referenceInJava/dependencies.kt index 3f0d30d0ce3..336b8e569a9 100644 --- a/idea/testData/resolve/referenceInJava/dependencies.kt +++ b/idea/testData/resolve/referenceInJava/dependencies.kt @@ -16,7 +16,7 @@ public fun topLevelFun() { } public class ClassWithClassObject { - class object { + default object { fun f() = 1 } } @@ -26,7 +26,7 @@ public object KotlinObject { } public trait StaticFieldInClassObjectInTrait { - class object { + default object { public val XX: String = "xx" } } diff --git a/idea/testData/resolve/references/ClassObjectClassLiteralReference.kt b/idea/testData/resolve/references/ClassObjectClassLiteralReference.kt index 264f019adbf..f6b28206dd7 100644 --- a/idea/testData/resolve/references/ClassObjectClassLiteralReference.kt +++ b/idea/testData/resolve/references/ClassObjectClassLiteralReference.kt @@ -1,7 +1,7 @@ package t class A { - class object Named { + default object Named { } } diff --git a/idea/testData/resolve/references/ClassObjectClassLiteralReferenceWithField.kt b/idea/testData/resolve/references/ClassObjectClassLiteralReferenceWithField.kt index 497af07deba..31c1a665f24 100644 --- a/idea/testData/resolve/references/ClassObjectClassLiteralReferenceWithField.kt +++ b/idea/testData/resolve/references/ClassObjectClassLiteralReferenceWithField.kt @@ -1,7 +1,7 @@ package t class A { - class object Named { + default object Named { val i: Int } } diff --git a/idea/testData/resolve/references/ClassQualifierForNestedClassConstructorCall.kt b/idea/testData/resolve/references/ClassQualifierForNestedClassConstructorCall.kt index 3aca717eb9a..0a123ec5e77 100644 --- a/idea/testData/resolve/references/ClassQualifierForNestedClassConstructorCall.kt +++ b/idea/testData/resolve/references/ClassQualifierForNestedClassConstructorCall.kt @@ -1,7 +1,7 @@ package t class A { - class object Default { + default object Default { } diff --git a/idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForFunction.kt b/idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForFunction.kt index 6916a0869ea..e76d7263eab 100644 --- a/idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForFunction.kt +++ b/idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForFunction.kt @@ -1,7 +1,7 @@ package t class A { - class object Default { + default object Default { } } @@ -13,5 +13,5 @@ fun test() { } -// REF: class object of (t).A +// REF: default object of (t).A diff --git a/idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForProperty.kt b/idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForProperty.kt index 6e05dfc0d4a..970577ec5ae 100644 --- a/idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForProperty.kt +++ b/idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForProperty.kt @@ -1,7 +1,7 @@ package t class A { - class object B { + default object B { } } @@ -13,5 +13,5 @@ fun test() { } -// REF: class object of (t).A +// REF: default object of (t).A diff --git a/idea/testData/resolve/references/DefaultObjectAsReceiverForExtensionFunctionOnSuperType.kt b/idea/testData/resolve/references/DefaultObjectAsReceiverForExtensionFunctionOnSuperType.kt index 556034c3ffb..8a2d71fc7ca 100644 --- a/idea/testData/resolve/references/DefaultObjectAsReceiverForExtensionFunctionOnSuperType.kt +++ b/idea/testData/resolve/references/DefaultObjectAsReceiverForExtensionFunctionOnSuperType.kt @@ -3,7 +3,7 @@ package t trait Trait open class A { - class object Default : Trait { + default object Default : Trait { } } @@ -15,5 +15,5 @@ fun test() { } -// REF: class object of (t).A +// REF: default object of (t).A diff --git a/idea/testData/resolve/references/DefaultObjectAsReceiverForMemberPropertyInSuperType.kt b/idea/testData/resolve/references/DefaultObjectAsReceiverForMemberPropertyInSuperType.kt index e728c264984..50928090644 100644 --- a/idea/testData/resolve/references/DefaultObjectAsReceiverForMemberPropertyInSuperType.kt +++ b/idea/testData/resolve/references/DefaultObjectAsReceiverForMemberPropertyInSuperType.kt @@ -5,7 +5,7 @@ trait Trait { } open class A { - class object Default : Trait { + default object Default : Trait { } } @@ -15,5 +15,5 @@ fun test() { } -// REF: class object of (t).A +// REF: default object of (t).A diff --git a/idea/testData/resolve/references/DefaultObjectInShortReferenceFormCall.kt b/idea/testData/resolve/references/DefaultObjectInShortReferenceFormCall.kt index f18a985e147..3e467467bec 100644 --- a/idea/testData/resolve/references/DefaultObjectInShortReferenceFormCall.kt +++ b/idea/testData/resolve/references/DefaultObjectInShortReferenceFormCall.kt @@ -1,7 +1,7 @@ package t class A { - class object Default { + default object Default { fun test() } } @@ -11,5 +11,5 @@ fun test() { } -// REF: class object of (t).A +// REF: default object of (t).A diff --git a/idea/testData/resolve/references/InObjectClassObject.kt b/idea/testData/resolve/references/InObjectClassObject.kt index 549ed1ad603..fa625e47972 100644 --- a/idea/testData/resolve/references/InObjectClassObject.kt +++ b/idea/testData/resolve/references/InObjectClassObject.kt @@ -3,7 +3,7 @@ package test class A object b { - class object { + default object { val x = A() } } diff --git a/idea/testData/resolve/references/InSecondClassObject.kt b/idea/testData/resolve/references/InSecondClassObject.kt index c1dafa4cbc7..4ec83db5f3d 100644 --- a/idea/testData/resolve/references/InSecondClassObject.kt +++ b/idea/testData/resolve/references/InSecondClassObject.kt @@ -3,11 +3,11 @@ package test class A class Many { - class object { + default object { val x = A() } - class object { + default object { val y = A() } } diff --git a/idea/testData/resolve/references/NamedClassObject.kt b/idea/testData/resolve/references/NamedClassObject.kt index 0ef23ee4690..e162adf8b85 100644 --- a/idea/testData/resolve/references/NamedClassObject.kt +++ b/idea/testData/resolve/references/NamedClassObject.kt @@ -1,7 +1,7 @@ package a class A { - class object Named { + default object Named { val i: Int } } @@ -10,4 +10,4 @@ fun main(args: Array) { A.Named.i } -// REF: class object of (a).A \ No newline at end of file +// REF: default object of (a).A \ No newline at end of file diff --git a/idea/testData/resolve/references/PropertyPlaceInClassObjectInObject.kt b/idea/testData/resolve/references/PropertyPlaceInClassObjectInObject.kt index e3752159b43..474f8a5df05 100644 --- a/idea/testData/resolve/references/PropertyPlaceInClassObjectInObject.kt +++ b/idea/testData/resolve/references/PropertyPlaceInClassObjectInObject.kt @@ -1,7 +1,7 @@ package testing object Testing { - class object { + default object { va } } diff --git a/idea/testData/run/ClassesAndObjects/module/src/test.kt b/idea/testData/run/ClassesAndObjects/module/src/test.kt index 222c4a87846..fa7b4b2f88d 100644 --- a/idea/testData/run/ClassesAndObjects/module/src/test.kt +++ b/idea/testData/run/ClassesAndObjects/module/src/test.kt @@ -11,7 +11,7 @@ object Foo { // RUN: q.Foo.InnerFoo class InnerFoo { - class object { + default object { // RUN: q.Foo.InnerFoo platformStatic fun main(s: Array) { println("InnerFoo") @@ -38,7 +38,7 @@ object Foo2 { // RUN: q.Bar class Bar { - class object { + default object { // RUN: q.Bar platformStatic fun main(s: Array) { println("Bar") @@ -48,7 +48,7 @@ class Bar { // RUN: q.QPackage class Bar2 { - class object { + default object { // RUN: q.QPackage fun main(s: Array) { println("Bar2") diff --git a/idea/testData/search/annotations/testAnnotationsOnFunction.kt b/idea/testData/search/annotations/testAnnotationsOnFunction.kt index 6f76080360a..e6bfd37d69f 100644 --- a/idea/testData/search/annotations/testAnnotationsOnFunction.kt +++ b/idea/testData/search/annotations/testAnnotationsOnFunction.kt @@ -17,7 +17,7 @@ class Test5() { } class Test6() { - class object { + default object { Deprecated fun test6() {} } } diff --git a/idea/testData/shortenRefs/classObject.kt b/idea/testData/shortenRefs/classObject.kt index 013fa3172ef..6b291a294bd 100644 --- a/idea/testData/shortenRefs/classObject.kt +++ b/idea/testData/shortenRefs/classObject.kt @@ -15,11 +15,11 @@ package p.q } class MyClass { - class object { + default object { val coProp = 1 class Nested { - class object { + default object { val c: Int = 1 } } diff --git a/idea/testData/shortenRefs/classObject.kt.after b/idea/testData/shortenRefs/classObject.kt.after index 5425f4f920b..0ac6a7d27db 100644 --- a/idea/testData/shortenRefs/classObject.kt.after +++ b/idea/testData/shortenRefs/classObject.kt.after @@ -15,11 +15,11 @@ fun foo(myC: MyClass, def: MyClass.Default, nes: MyClass.Default.Nested) { } class MyClass { - class object { + default object { val coProp = 1 class Nested { - class object { + default object { val c: Int = 1 } } diff --git a/idea/testData/structureView/fileStructure/Render.after b/idea/testData/structureView/fileStructure/Render.after index d8c493f1def..8c7930a7548 100644 --- a/idea/testData/structureView/fileStructure/Render.after +++ b/idea/testData/structureView/fileStructure/Render.after @@ -12,7 +12,7 @@ Inner1 Inner2 -A6 - -class object of A6 + -default object of A6 test(): Unit -A7 diff --git a/idea/testData/structureView/fileStructure/Render.kt b/idea/testData/structureView/fileStructure/Render.kt index 581ec4f8018..8f32044ba54 100644 --- a/idea/testData/structureView/fileStructure/Render.kt +++ b/idea/testData/structureView/fileStructure/Render.kt @@ -25,7 +25,7 @@ class A5 { inner class Inner2 } class A6 { - class object { + default object { fun test() {} } } diff --git a/idea/testData/stubs/ClassObject.expected b/idea/testData/stubs/ClassObject.expected index 156380a273e..8eb46e3e5c5 100644 --- a/idea/testData/stubs/ClassObject.expected +++ b/idea/testData/stubs/ClassObject.expected @@ -3,6 +3,7 @@ PsiJetFileStubImpl[package=] CLASS:[fqName=C, isEnumEntry=false, isLocal=false, isTopLevel=true, isTrait=false, name=C, superNames=[]] CLASS_BODY: OBJECT_DECLARATION:[fqName=C.Default, isDefault=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]] + MODIFIER_LIST:[default] CLASS_BODY: FUN:[fqName=C.Default.foo, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isProbablyNothingType=false, isTopLevel=false, name=foo] VALUE_PARAMETER_LIST: diff --git a/idea/testData/stubs/ClassObject.kt b/idea/testData/stubs/ClassObject.kt index eb2dd4b3b11..abbd15a8644 100644 --- a/idea/testData/stubs/ClassObject.kt +++ b/idea/testData/stubs/ClassObject.kt @@ -1,4 +1,4 @@ -class C { class object { +class C { default object { fun foo() { } } diff --git a/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt b/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt index 928a1a3a160..3c270314dfe 100644 --- a/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt +++ b/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt @@ -20,7 +20,7 @@ fun foo() { println(2) } - class object { + default object { fun f() = 1 val g = f() - 1 } @@ -39,7 +39,7 @@ fun foo() { val p = 1 - class object { + default object { fun f() = 1 val g = f() - 1 } @@ -77,7 +77,7 @@ fun foo() { println(2) } - class object { + default object { fun f() = 1 val g = f() - 1 } @@ -103,7 +103,7 @@ fun foo() { println(2) } - class object { + default object { fun f() = 1 val g = f() - 1 } @@ -129,7 +129,7 @@ fun foo() { println(2) } - class object { + default object { fun f() = 1 val g = f() - 1 } diff --git a/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt.match b/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt.match index 479d1a2ea22..a64bff1e430 100644 --- a/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt.match +++ b/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt.match @@ -18,7 +18,7 @@ class A { println(2) } - class object { + default object { fun f() = 1 val g = f() - 1 } @@ -37,7 +37,7 @@ class B { val p = 1 - class object { + default object { fun f() = 1 val g = f() - 1 } diff --git a/idea/tests/org/jetbrains/kotlin/idea/actions/QualifiedNamesTest.kt b/idea/tests/org/jetbrains/kotlin/idea/actions/QualifiedNamesTest.kt index f2dd4112f1c..b919c380b4e 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/actions/QualifiedNamesTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/actions/QualifiedNamesTest.kt @@ -35,7 +35,7 @@ public class QualifiedNamesTest: LightCodeInsightTestCase() { class Klass { class Nested - class object { + default object { } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/stubs/DebugTextByStubTest.kt b/idea/tests/org/jetbrains/kotlin/idea/stubs/DebugTextByStubTest.kt index 6a4fa9ae439..5d376eb3908 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/stubs/DebugTextByStubTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/stubs/DebugTextByStubTest.kt @@ -133,7 +133,6 @@ public class DebugTextByStubTest : LightCodeInsightFixtureTestCase() { function("fun T.foo(b: T): List") function("fun f() where T : G") function("fun f() where T : G, G : T") - function("fun f() where class object T : G") function("private final fun f()") } @@ -200,10 +199,10 @@ public class DebugTextByStubTest : LightCodeInsightFixtureTestCase() { } fun testClassObject() { - val tree = createStubTree("class A { class object Def {} }") + val tree = createStubTree("class A { default object Def {} }") val defaultObject = tree.findChildStubByType(JetStubElementTypes.CLASS)!!.findChildStubByType(JetStubElementTypes.CLASS_BODY)!! .findChildStubByType(JetStubElementTypes.OBJECT_DECLARATION) - assertEquals("STUB: class object Def", JetObjectDeclaration(defaultObject as KotlinObjectStub).getDebugText()) + assertEquals("STUB: default object Def", JetObjectDeclaration(defaultObject as KotlinObjectStub).getDebugText()) } fun testPropertyAccessors() { diff --git a/idea/tests/org/jetbrains/kotlin/test/ReferenceUtils.java b/idea/tests/org/jetbrains/kotlin/test/ReferenceUtils.java index 61f9319f3a6..76f2533be10 100644 --- a/idea/tests/org/jetbrains/kotlin/test/ReferenceUtils.java +++ b/idea/tests/org/jetbrains/kotlin/test/ReferenceUtils.java @@ -43,7 +43,7 @@ public final class ReferenceUtils { //default presenter return null for default object JetClass containingClass = PsiTreeUtil.getParentOfType(navigationElement, JetClass.class); assert containingClass != null; - return "class object of " + renderAsGotoImplementation(containingClass); + return "default object of " + renderAsGotoImplementation(containingClass); } Assert.assertTrue(navigationElement instanceof NavigationItem); diff --git a/j2k/src/org/jetbrains/kotlin/j2k/ClassBodyConverter.kt b/j2k/src/org/jetbrains/kotlin/j2k/ClassBodyConverter.kt index ac56c202bc3..063288e13a0 100644 --- a/j2k/src/org/jetbrains/kotlin/j2k/ClassBodyConverter.kt +++ b/j2k/src/org/jetbrains/kotlin/j2k/ClassBodyConverter.kt @@ -137,7 +137,7 @@ class ClassBodyConverter(private val psiClass: PsiClass, } } - // we generate nested classes with factory functions into class object as a workaround until secondary constructors supported by Kotlin + // we generate nested classes with factory functions into default object as a workaround until secondary constructors supported by Kotlin private fun shouldGenerateIntoDefaultObject(nestedClass: Class) = !nestedClass.modifiers.contains(Modifier.INNER) && nestedClass.body.factoryFunctions.isNotEmpty() diff --git a/j2k/src/org/jetbrains/kotlin/j2k/ast/ClassBody.kt b/j2k/src/org/jetbrains/kotlin/j2k/ast/ClassBody.kt index 68765c1f109..a754687ff6d 100644 --- a/j2k/src/org/jetbrains/kotlin/j2k/ast/ClassBody.kt +++ b/j2k/src/org/jetbrains/kotlin/j2k/ast/ClassBody.kt @@ -45,6 +45,6 @@ class ClassBody ( private fun appendDefaultObject(builder: CodeBuilder, blankLineBefore: Boolean) { if (defaultObjectMembers.isEmpty()) return if (blankLineBefore) builder.append("\n\n") - builder.append(defaultObjectMembers, "\n", "class object {\n", "\n}") + builder.append(defaultObjectMembers, "\n", "default object {\n", "\n}") } } diff --git a/j2k/testData/KotlinApi.kt b/j2k/testData/KotlinApi.kt index c83b1815deb..a42fc560d75 100644 --- a/j2k/testData/KotlinApi.kt +++ b/j2k/testData/KotlinApi.kt @@ -6,7 +6,7 @@ public open class KotlinClass(public var field: Int) { public open fun foo(mutableCollection: MutableCollection, nullableCollection: Collection?): MutableList = arrayListOf() - class object { + default object { public fun staticFun(p: Int): Int = p public var staticVar: Int = 1 public var staticProperty: Int diff --git a/j2k/testData/fileOrElement/annotations/annotationInterface3.kt b/j2k/testData/fileOrElement/annotations/annotationInterface3.kt index daff787669f..0e4cdc32048 100644 --- a/j2k/testData/fileOrElement/annotations/annotationInterface3.kt +++ b/j2k/testData/fileOrElement/annotations/annotationInterface3.kt @@ -6,7 +6,7 @@ annotation class Anon(public val value: String) { B } - class object { + default object { public val field: E = E.A } @@ -14,7 +14,7 @@ annotation class Anon(public val value: String) { Anon("a") trait I { - class object { + default object { public val e: Anon.E = Anon.field } } \ No newline at end of file diff --git a/j2k/testData/fileOrElement/anonymousBlock/oneStaticAnonBlock.kt b/j2k/testData/fileOrElement/anonymousBlock/oneStaticAnonBlock.kt index 3a01c285f88..d1dc60c8dfe 100644 --- a/j2k/testData/fileOrElement/anonymousBlock/oneStaticAnonBlock.kt +++ b/j2k/testData/fileOrElement/anonymousBlock/oneStaticAnonBlock.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { var str: String { str = "Ola" diff --git a/j2k/testData/fileOrElement/callChainExpression/libraryFieldCall.kt b/j2k/testData/fileOrElement/callChainExpression/libraryFieldCall.kt index 22913c1692a..86df1bf3988 100644 --- a/j2k/testData/fileOrElement/callChainExpression/libraryFieldCall.kt +++ b/j2k/testData/fileOrElement/callChainExpression/libraryFieldCall.kt @@ -1,6 +1,6 @@ // ERROR: Property must be initialized or be abstract class Library { - class object { + default object { val ourOut: java.io.PrintStream } } diff --git a/j2k/testData/fileOrElement/callChainExpression/libraryMethodCall.kt b/j2k/testData/fileOrElement/callChainExpression/libraryMethodCall.kt index a9c06368ed8..fcfc9f36ff0 100644 --- a/j2k/testData/fileOrElement/callChainExpression/libraryMethodCall.kt +++ b/j2k/testData/fileOrElement/callChainExpression/libraryMethodCall.kt @@ -1,5 +1,5 @@ class Library { - class object { + default object { fun call() { } diff --git a/j2k/testData/fileOrElement/class/ClassShadowing.kt b/j2k/testData/fileOrElement/class/ClassShadowing.kt index a78afd35b70..6b9ee77b6e4 100644 --- a/j2k/testData/fileOrElement/class/ClassShadowing.kt +++ b/j2k/testData/fileOrElement/class/ClassShadowing.kt @@ -1,7 +1,7 @@ package test public class Short { - class object { + default object { public fun valueOf(value: String): Short { return Short() } @@ -9,7 +9,7 @@ public class Short { } class Test { - class object { + default object { public fun test() { test.Short.valueOf("1") test.Short.valueOf("1") diff --git a/j2k/testData/fileOrElement/class/oneStaticFieldOneNonStatic.kt b/j2k/testData/fileOrElement/class/oneStaticFieldOneNonStatic.kt index 48e905da0a6..ac1d1897d88 100644 --- a/j2k/testData/fileOrElement/class/oneStaticFieldOneNonStatic.kt +++ b/j2k/testData/fileOrElement/class/oneStaticFieldOneNonStatic.kt @@ -3,7 +3,7 @@ class S { return true } - class object { + default object { var myI = 10 } } \ No newline at end of file diff --git a/j2k/testData/fileOrElement/class/oneStaticMethod.kt b/j2k/testData/fileOrElement/class/oneStaticMethod.kt index 6040f94a592..24446e74be1 100644 --- a/j2k/testData/fileOrElement/class/oneStaticMethod.kt +++ b/j2k/testData/fileOrElement/class/oneStaticMethod.kt @@ -1,5 +1,5 @@ class S { - class object { + default object { fun staticF(): Boolean { return true } diff --git a/j2k/testData/fileOrElement/class/oneStaticMethodOneNonStatic.kt b/j2k/testData/fileOrElement/class/oneStaticMethodOneNonStatic.kt index c5eafb62c59..a55ebfbc01d 100644 --- a/j2k/testData/fileOrElement/class/oneStaticMethodOneNonStatic.kt +++ b/j2k/testData/fileOrElement/class/oneStaticMethodOneNonStatic.kt @@ -3,7 +3,7 @@ class S { return true } - class object { + default object { fun sI(): Int { return 1 } diff --git a/j2k/testData/fileOrElement/class/twoStaticMethod.kt b/j2k/testData/fileOrElement/class/twoStaticMethod.kt index 492b8be2c3b..fd375cd4eec 100644 --- a/j2k/testData/fileOrElement/class/twoStaticMethod.kt +++ b/j2k/testData/fileOrElement/class/twoStaticMethod.kt @@ -1,5 +1,5 @@ class S { - class object { + default object { fun sB(): Boolean { return true } diff --git a/j2k/testData/fileOrElement/classExpression/primitivesAndArrays.kt b/j2k/testData/fileOrElement/classExpression/primitivesAndArrays.kt index 732a3eb49d7..6727ff14939 100644 --- a/j2k/testData/fileOrElement/classExpression/primitivesAndArrays.kt +++ b/j2k/testData/fileOrElement/classExpression/primitivesAndArrays.kt @@ -1,5 +1,5 @@ public class A { - class object { + default object { public fun main(args: Array) { System.out.println(Void.TYPE) System.out.println(Integer.TYPE) diff --git a/j2k/testData/fileOrElement/comments/comments2.kt b/j2k/testData/fileOrElement/comments/comments2.kt index 7323e81ea3a..d3f81579f7e 100644 --- a/j2k/testData/fileOrElement/comments/comments2.kt +++ b/j2k/testData/fileOrElement/comments/comments2.kt @@ -21,7 +21,7 @@ class A { protected /*it's protected*/ fun foo(c: Char) { } - class object { + default object { public /*it's public*//*and static*//*and final*/ val C: Int = 1 } diff --git a/j2k/testData/fileOrElement/constructors/allCallsPrimary.kt b/j2k/testData/fileOrElement/constructors/allCallsPrimary.kt index 2ece3fb9dc9..5f8c8a67410 100644 --- a/j2k/testData/fileOrElement/constructors/allCallsPrimary.kt +++ b/j2k/testData/fileOrElement/constructors/allCallsPrimary.kt @@ -3,7 +3,7 @@ package pack class C(arg1: Int, arg2: Int = 0, arg3: Int = 0) public class User { - class object { + default object { public fun main() { val c1 = C(100, 100, 100) val c2 = C(100, 100) diff --git a/j2k/testData/fileOrElement/constructors/allCallsPrimary2.kt b/j2k/testData/fileOrElement/constructors/allCallsPrimary2.kt index 397d3be0246..0223b9360d8 100644 --- a/j2k/testData/fileOrElement/constructors/allCallsPrimary2.kt +++ b/j2k/testData/fileOrElement/constructors/allCallsPrimary2.kt @@ -23,7 +23,7 @@ class C(val myArg1: Int) { } public class User { - class object { + default object { public fun main() { val c1 = C(100, 100, 100) val c2 = C(100, 100) diff --git a/j2k/testData/fileOrElement/constructors/chain.kt b/j2k/testData/fileOrElement/constructors/chain.kt index 7989e566539..b664fa361f4 100644 --- a/j2k/testData/fileOrElement/constructors/chain.kt +++ b/j2k/testData/fileOrElement/constructors/chain.kt @@ -13,7 +13,7 @@ fun C(arg1: Int): C { class C(arg1: Int, arg2: Int, arg3: Int) public class User { - class object { + default object { public fun main() { val c1 = C(1, 2, 3) val c2 = C(5, 6) diff --git a/j2k/testData/fileOrElement/constructors/customerBuilder.kt b/j2k/testData/fileOrElement/constructors/customerBuilder.kt index c2ab4703685..48eccc0ce29 100644 --- a/j2k/testData/fileOrElement/constructors/customerBuilder.kt +++ b/j2k/testData/fileOrElement/constructors/customerBuilder.kt @@ -34,7 +34,7 @@ class CustomerBuilder { } public class User { - class object { + default object { public fun main() { val customer = CustomerBuilder().WithFirstName("Homer").WithLastName("Simpson").Build() System.out.println(customer.firstName) diff --git a/j2k/testData/fileOrElement/constructors/genericIdentifier.kt b/j2k/testData/fileOrElement/constructors/genericIdentifier.kt index cf1a7bc3ab2..c1fb9c1dd98 100644 --- a/j2k/testData/fileOrElement/constructors/genericIdentifier.kt +++ b/j2k/testData/fileOrElement/constructors/genericIdentifier.kt @@ -25,7 +25,7 @@ public class Identifier(public val name: T, private val myHasDollar: Boolean) } public class User { - class object { + default object { public fun main() { val i1 = Identifier("name", false, true) val i2 = Identifier("name", false) diff --git a/j2k/testData/fileOrElement/constructors/identifier.kt b/j2k/testData/fileOrElement/constructors/identifier.kt index 94569bf08ab..3f1af6bb623 100644 --- a/j2k/testData/fileOrElement/constructors/identifier.kt +++ b/j2k/testData/fileOrElement/constructors/identifier.kt @@ -25,7 +25,7 @@ public class Identifier(public val name: String, private val myHasDollar: Boolea } public class User { - class object { + default object { public fun main() { val i1 = Identifier("name", false, true) val i2 = Identifier("name", false) diff --git a/j2k/testData/fileOrElement/constructors/methodCallInFactoryFun.kt b/j2k/testData/fileOrElement/constructors/methodCallInFactoryFun.kt index 3cf1947800b..a3ab97cd273 100644 --- a/j2k/testData/fileOrElement/constructors/methodCallInFactoryFun.kt +++ b/j2k/testData/fileOrElement/constructors/methodCallInFactoryFun.kt @@ -12,7 +12,7 @@ class C(private val arg1: Int, private val arg2: Int, private val arg3: Int) { return p } - class object { + default object { private fun staticFoo(p: Int): Int { return p } diff --git a/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults.kt b/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults.kt index 2b1329fa6e2..54437129e4a 100644 --- a/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults.kt +++ b/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults.kt @@ -1,7 +1,7 @@ class A(nested: A.Nested = A.Nested(A.Nested.FIELD)) { class Nested(p: Int) { - class object { + default object { public val FIELD: Int = 0 } diff --git a/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults2.kt b/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults2.kt index a4be5edf7ff..1449143d302 100644 --- a/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults2.kt +++ b/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults2.kt @@ -4,7 +4,7 @@ import A.Nested class A(nested: Nested = Nested(Nested.FIELD)) { class Nested(p: Int) { - class object { + default object { public val FIELD: Int = 0 } diff --git a/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults3.kt b/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults3.kt index 39c6a7cf16b..53f45098635 100644 --- a/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults3.kt +++ b/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults3.kt @@ -6,7 +6,7 @@ import pack.A.Nested class A(nested: Nested = Nested(Nested.FIELD)) { class Nested(p: Int) { - class object { + default object { public val FIELD: Int = 0 } diff --git a/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults4.kt b/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults4.kt index d4cdd08451a..2cf0810eca2 100644 --- a/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults4.kt +++ b/j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults4.kt @@ -6,7 +6,7 @@ import pack.A.* class A(nested: Nested = Nested(Nested.FIELD)) { class Nested(p: Int) { - class object { + default object { public val FIELD: Int = 0 } diff --git a/j2k/testData/fileOrElement/constructors/nestedClassNameInSuperParameters.kt b/j2k/testData/fileOrElement/constructors/nestedClassNameInSuperParameters.kt index f26f7ead8a3..343b97f5335 100644 --- a/j2k/testData/fileOrElement/constructors/nestedClassNameInSuperParameters.kt +++ b/j2k/testData/fileOrElement/constructors/nestedClassNameInSuperParameters.kt @@ -1,7 +1,7 @@ open class Base(nested: Base.Nested) { class Nested(p: Int) { - class object { + default object { public val FIELD: Int = 0 } diff --git a/j2k/testData/fileOrElement/constructors/noPrimary.kt b/j2k/testData/fileOrElement/constructors/noPrimary.kt index bb2091236c1..bcb1390a1d8 100644 --- a/j2k/testData/fileOrElement/constructors/noPrimary.kt +++ b/j2k/testData/fileOrElement/constructors/noPrimary.kt @@ -17,7 +17,7 @@ fun C(arg: Int): C { class C public class User { - class object { + default object { public fun main() { val c1 = C(1, 2, 3) val c2 = C(5, 6) diff --git a/j2k/testData/fileOrElement/constructors/parameterModification.kt b/j2k/testData/fileOrElement/constructors/parameterModification.kt index 841ec287812..d0757ca92c7 100644 --- a/j2k/testData/fileOrElement/constructors/parameterModification.kt +++ b/j2k/testData/fileOrElement/constructors/parameterModification.kt @@ -20,7 +20,7 @@ class C(arg1: Int, arg2: Int = 0, arg3: Int = 0) { } public class User { - class object { + default object { public fun main() { val c1 = C(100, 100, 100) val c2 = C(100, 100) diff --git a/j2k/testData/fileOrElement/constructors/secondaryConstructorsInNestedClass.kt b/j2k/testData/fileOrElement/constructors/secondaryConstructorsInNestedClass.kt index adfdfd90cde..2ef4182fb28 100644 --- a/j2k/testData/fileOrElement/constructors/secondaryConstructorsInNestedClass.kt +++ b/j2k/testData/fileOrElement/constructors/secondaryConstructorsInNestedClass.kt @@ -1,5 +1,5 @@ class Outer { - class object { + default object { private fun Nested1(a: Int): Nested1 { return Nested1() diff --git a/j2k/testData/fileOrElement/constructors/staticFieldRefInFactoryFun.kt b/j2k/testData/fileOrElement/constructors/staticFieldRefInFactoryFun.kt index 17cd586f89a..79b6cb788f5 100644 --- a/j2k/testData/fileOrElement/constructors/staticFieldRefInFactoryFun.kt +++ b/j2k/testData/fileOrElement/constructors/staticFieldRefInFactoryFun.kt @@ -7,7 +7,7 @@ fun C(p: Int): C { } class C { - class object { + default object { private val staticField1 = 0 private val staticField2 = 0 } diff --git a/j2k/testData/fileOrElement/constructors/withManyDefaultParams.kt b/j2k/testData/fileOrElement/constructors/withManyDefaultParams.kt index 6bd154bf8b7..0c74666d742 100644 --- a/j2k/testData/fileOrElement/constructors/withManyDefaultParams.kt +++ b/j2k/testData/fileOrElement/constructors/withManyDefaultParams.kt @@ -20,7 +20,7 @@ public class Test(private val myName: String) { protected var f: Short = 0 protected var g: Char = ' ' - class object { + default object { fun foo(n: String): String { return "" @@ -29,7 +29,7 @@ public class Test(private val myName: String) { } public class User { - class object { + default object { public fun main() { val t = Test("name") } diff --git a/j2k/testData/fileOrElement/field/conversion.kt b/j2k/testData/fileOrElement/field/conversion.kt index b4bfb15f5d6..5b70f21564a 100644 --- a/j2k/testData/fileOrElement/field/conversion.kt +++ b/j2k/testData/fileOrElement/field/conversion.kt @@ -5,7 +5,7 @@ class A { i = 10 } - class object { + default object { fun getByte(): Byte { return 0 diff --git a/j2k/testData/fileOrElement/formatting/staticAndNonStaticMembersWithComments.kt b/j2k/testData/fileOrElement/formatting/staticAndNonStaticMembersWithComments.kt index 739d7bf1a3b..358ffecb0f0 100644 --- a/j2k/testData/fileOrElement/formatting/staticAndNonStaticMembersWithComments.kt +++ b/j2k/testData/fileOrElement/formatting/staticAndNonStaticMembersWithComments.kt @@ -17,7 +17,7 @@ class F { fun f4() { } - class object { + default object { //c1 diff --git a/j2k/testData/fileOrElement/formatting/staticMembersWithComments.kt b/j2k/testData/fileOrElement/formatting/staticMembersWithComments.kt index 4ef3ba1a680..82e67bfdff9 100644 --- a/j2k/testData/fileOrElement/formatting/staticMembersWithComments.kt +++ b/j2k/testData/fileOrElement/formatting/staticMembersWithComments.kt @@ -1,5 +1,5 @@ class F { - class object { + default object { //c1 diff --git a/j2k/testData/fileOrElement/function/main.kt b/j2k/testData/fileOrElement/function/main.kt index bbc3b65a453..5ed03f3a6bd 100644 --- a/j2k/testData/fileOrElement/function/main.kt +++ b/j2k/testData/fileOrElement/function/main.kt @@ -1,4 +1,4 @@ -class object { +default object { public fun main(args: Array) { } } \ No newline at end of file diff --git a/j2k/testData/fileOrElement/function/main2.kt b/j2k/testData/fileOrElement/function/main2.kt index b24558d2327..c17342978b5 100644 --- a/j2k/testData/fileOrElement/function/main2.kt +++ b/j2k/testData/fileOrElement/function/main2.kt @@ -1,5 +1,5 @@ public class A { - class object { + default object { public fun main(args: Array) { } } diff --git a/j2k/testData/fileOrElement/function/mainAndNullabilitySetting.kt b/j2k/testData/fileOrElement/function/mainAndNullabilitySetting.kt index 2c9cc41c60c..5aa491efbe3 100644 --- a/j2k/testData/fileOrElement/function/mainAndNullabilitySetting.kt +++ b/j2k/testData/fileOrElement/function/mainAndNullabilitySetting.kt @@ -1,6 +1,6 @@ // !forceNotNullTypes: false public class A { - class object { + default object { public fun main(args: Array) { } } diff --git a/j2k/testData/fileOrElement/issues/arrayLength.kt b/j2k/testData/fileOrElement/issues/arrayLength.kt index 5901396f600..a7ec9333a32 100644 --- a/j2k/testData/fileOrElement/issues/arrayLength.kt +++ b/j2k/testData/fileOrElement/issues/arrayLength.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { public fun foo(args: Array): Int { return args.size } diff --git a/j2k/testData/fileOrElement/issues/doNotQualifyStatic.kt b/j2k/testData/fileOrElement/issues/doNotQualifyStatic.kt index d946dd5a3f3..62adfa1538a 100644 --- a/j2k/testData/fileOrElement/issues/doNotQualifyStatic.kt +++ b/j2k/testData/fileOrElement/issues/doNotQualifyStatic.kt @@ -6,7 +6,7 @@ class Outer { } } - class object { + default object { public var o: Any? = Object() } } \ No newline at end of file diff --git a/j2k/testData/fileOrElement/issues/kt-1074.kt b/j2k/testData/fileOrElement/issues/kt-1074.kt index a4aba42d72a..0ed22c64622 100644 --- a/j2k/testData/fileOrElement/issues/kt-1074.kt +++ b/j2k/testData/fileOrElement/issues/kt-1074.kt @@ -1,7 +1,7 @@ package demo class Test { - class object { + default object { fun subListRangeCheck(fromIndex: Int, toIndex: Int, size: Int) { if (fromIndex < 0) throw IndexOutOfBoundsException("fromIndex = " + fromIndex) diff --git a/j2k/testData/fileOrElement/issues/kt-638.kt b/j2k/testData/fileOrElement/issues/kt-638.kt index b7c993c4312..2855bac6129 100644 --- a/j2k/testData/fileOrElement/issues/kt-638.kt +++ b/j2k/testData/fileOrElement/issues/kt-638.kt @@ -25,7 +25,7 @@ public class Identifier(public val name: T, private val myHasDollar: Boolean) } public class User { - class object { + default object { public fun main(args: Array) { val i1 = Identifier("name", false, true) val i2 = Identifier("name", false) diff --git a/j2k/testData/fileOrElement/issues/kt-807.kt b/j2k/testData/fileOrElement/issues/kt-807.kt index 624fcc30812..9d6291e1c73 100644 --- a/j2k/testData/fileOrElement/issues/kt-807.kt +++ b/j2k/testData/fileOrElement/issues/kt-807.kt @@ -5,7 +5,7 @@ import java.io.* class FileRead { - class object { + default object { public fun main(args: Array) { try { val fstream = FileInputStream() diff --git a/j2k/testData/fileOrElement/issues/kt-809-string.kt b/j2k/testData/fileOrElement/issues/kt-809-string.kt index 6da5960b1cb..2973c8d304f 100644 --- a/j2k/testData/fileOrElement/issues/kt-809-string.kt +++ b/j2k/testData/fileOrElement/issues/kt-809-string.kt @@ -5,7 +5,7 @@ class Container { } class One { - class object { + default object { var myContainer = Container() } } diff --git a/j2k/testData/fileOrElement/issues/kt-809.kt b/j2k/testData/fileOrElement/issues/kt-809.kt index 49ea14462f5..03773061156 100644 --- a/j2k/testData/fileOrElement/issues/kt-809.kt +++ b/j2k/testData/fileOrElement/issues/kt-809.kt @@ -5,7 +5,7 @@ class Container { } class One { - class object { + default object { var myContainer = Container() } } diff --git a/j2k/testData/fileOrElement/issues/kt-820-field.kt b/j2k/testData/fileOrElement/issues/kt-820-field.kt index eafb079518a..96b7e34cf6d 100644 --- a/j2k/testData/fileOrElement/issues/kt-820-field.kt +++ b/j2k/testData/fileOrElement/issues/kt-820-field.kt @@ -5,7 +5,7 @@ class Container { } class One { - class object { + default object { var myContainer = Container() } } diff --git a/j2k/testData/fileOrElement/issues/kt-820-string.kt b/j2k/testData/fileOrElement/issues/kt-820-string.kt index 814e8e24768..fd2918197ef 100644 --- a/j2k/testData/fileOrElement/issues/kt-820-string.kt +++ b/j2k/testData/fileOrElement/issues/kt-820-string.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { public fun toFileSystemSafeName(name: String): String { val size = name.length() return name diff --git a/j2k/testData/fileOrElement/issues/kt-820.kt b/j2k/testData/fileOrElement/issues/kt-820.kt index db8bb5bbde6..d01c0468374 100644 --- a/j2k/testData/fileOrElement/issues/kt-820.kt +++ b/j2k/testData/fileOrElement/issues/kt-820.kt @@ -5,7 +5,7 @@ class Container { } class One { - class object { + default object { var myContainer = Container() } } diff --git a/j2k/testData/fileOrElement/issues/kt-824-isDir.kt b/j2k/testData/fileOrElement/issues/kt-824-isDir.kt index 2239e074545..9a6be7cc414 100644 --- a/j2k/testData/fileOrElement/issues/kt-824-isDir.kt +++ b/j2k/testData/fileOrElement/issues/kt-824-isDir.kt @@ -6,7 +6,7 @@ import java.io.File * User: ignatov */ public class Test { - class object { + default object { public fun isDir(parent: File?): Boolean { if (parent == null || !parent.exists()) { return false diff --git a/j2k/testData/fileOrElement/issues/kt-824.kt b/j2k/testData/fileOrElement/issues/kt-824.kt index 83972e65098..378d2630886 100644 --- a/j2k/testData/fileOrElement/issues/kt-824.kt +++ b/j2k/testData/fileOrElement/issues/kt-824.kt @@ -5,7 +5,7 @@ class Container { } class One { - class object { + default object { var myContainer = Container() } } diff --git a/j2k/testData/fileOrElement/issues/kt-837.kt b/j2k/testData/fileOrElement/issues/kt-837.kt index b6b3bef0653..932fa2c1182 100644 --- a/j2k/testData/fileOrElement/issues/kt-837.kt +++ b/j2k/testData/fileOrElement/issues/kt-837.kt @@ -8,7 +8,7 @@ public class Language(protected var code: String) : Serializable { return other.toString() == this.toString() } - class object { + default object { public var ENGLISH: Language = Language("en") public var SWEDISH: Language = Language("sv") private val serialVersionUID = -2442762969929206780 diff --git a/j2k/testData/fileOrElement/issues/kt-871.kt b/j2k/testData/fileOrElement/issues/kt-871.kt index 3afd63a22dc..c848bfd8771 100644 --- a/j2k/testData/fileOrElement/issues/kt-871.kt +++ b/j2k/testData/fileOrElement/issues/kt-871.kt @@ -1,7 +1,7 @@ package demo class Program { - class object { + default object { public fun main(args: Array) { System.out.println("Halo!") } diff --git a/j2k/testData/fileOrElement/issues/kt-879.kt b/j2k/testData/fileOrElement/issues/kt-879.kt index 35d52670192..9145e6ecbcc 100644 --- a/j2k/testData/fileOrElement/issues/kt-879.kt +++ b/j2k/testData/fileOrElement/issues/kt-879.kt @@ -1,5 +1,5 @@ class Test { - class object { + default object { public fun getInt(i: Int): Int { when (i) { 0 -> return 0 diff --git a/j2k/testData/fileOrElement/methodCallExpression/vararg1.kt b/j2k/testData/fileOrElement/methodCallExpression/vararg1.kt index 9e4c30a7fd5..83c0e497992 100644 --- a/j2k/testData/fileOrElement/methodCallExpression/vararg1.kt +++ b/j2k/testData/fileOrElement/methodCallExpression/vararg1.kt @@ -1,7 +1,7 @@ import java.lang.reflect.Constructor class X { - class object { + default object { throws(javaClass()) fun foo(constructor: Constructor, args1: Array, args2: Array) { constructor.newInstance(*args1) diff --git a/j2k/testData/fileOrElement/nullability/MethodResultInitializesNullableField.kt b/j2k/testData/fileOrElement/nullability/MethodResultInitializesNullableField.kt index 2357a1f3eb5..7c069555687 100644 --- a/j2k/testData/fileOrElement/nullability/MethodResultInitializesNullableField.kt +++ b/j2k/testData/fileOrElement/nullability/MethodResultInitializesNullableField.kt @@ -2,7 +2,7 @@ class C { private val string = getString() - class object { + default object { fun getString(): String? { return x() diff --git a/j2k/testData/fileOrElement/staticMembers/PrivateStaticMembers.kt b/j2k/testData/fileOrElement/staticMembers/PrivateStaticMembers.kt index b7837a27d58..09949e086fa 100644 --- a/j2k/testData/fileOrElement/staticMembers/PrivateStaticMembers.kt +++ b/j2k/testData/fileOrElement/staticMembers/PrivateStaticMembers.kt @@ -5,7 +5,7 @@ class A { privateStatic2() } - class object { + default object { private val s = "abc" private fun privateStatic1() { diff --git a/j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods2.kt b/j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods2.kt index 7c520ce726a..148579f20cc 100644 --- a/j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods2.kt +++ b/j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods2.kt @@ -4,7 +4,7 @@ class A { privateStatic2() } - class object { + default object { public fun publicStatic() { privateStatic1() diff --git a/j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods3.kt b/j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods3.kt index 1cec928bb3b..87c5f8299ea 100644 --- a/j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods3.kt +++ b/j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods3.kt @@ -9,7 +9,7 @@ class A { privateStatic2() } - class object { + default object { private fun privateStatic1() { } diff --git a/j2k/testData/fileOrElement/switch/comlicatedFallDown.kt b/j2k/testData/fileOrElement/switch/comlicatedFallDown.kt index bf2ab743683..53e9a0b6436 100644 --- a/j2k/testData/fileOrElement/switch/comlicatedFallDown.kt +++ b/j2k/testData/fileOrElement/switch/comlicatedFallDown.kt @@ -1,7 +1,7 @@ package demo public class SwitchDemo { - class object { + default object { public fun print(o: Any) { System.out.println(o) } diff --git a/j2k/testData/fileOrElement/switch/emptySwitch.kt b/j2k/testData/fileOrElement/switch/emptySwitch.kt index 800aa2d80de..5e4cb8546b7 100644 --- a/j2k/testData/fileOrElement/switch/emptySwitch.kt +++ b/j2k/testData/fileOrElement/switch/emptySwitch.kt @@ -1,5 +1,5 @@ public class NonDefault { - class object { + default object { public fun main(args: Array) { val value = 3 diff --git a/j2k/testData/fileOrElement/switch/fallDown.kt b/j2k/testData/fileOrElement/switch/fallDown.kt index 6929b609e8e..82de392ce66 100644 --- a/j2k/testData/fileOrElement/switch/fallDown.kt +++ b/j2k/testData/fileOrElement/switch/fallDown.kt @@ -1,7 +1,7 @@ package switch_demo public class SwitchDemo { - class object { + default object { public fun main(args: Array) { val month = 8 val monthString: String diff --git a/j2k/testData/fileOrElement/switch/fallDownWithBlocks.kt b/j2k/testData/fileOrElement/switch/fallDownWithBlocks.kt index 7beb1782fa3..eaab59c74ae 100644 --- a/j2k/testData/fileOrElement/switch/fallDownWithBlocks.kt +++ b/j2k/testData/fileOrElement/switch/fallDownWithBlocks.kt @@ -1,5 +1,5 @@ public class C { - class object { + default object { public fun main(args: Array) { when (args.size) { 1 -> { diff --git a/j2k/testData/fileOrElement/switch/kt-539.kt b/j2k/testData/fileOrElement/switch/kt-539.kt index 3cc798a0e52..bd4801a2c1d 100644 --- a/j2k/testData/fileOrElement/switch/kt-539.kt +++ b/j2k/testData/fileOrElement/switch/kt-539.kt @@ -1,7 +1,7 @@ package switch_demo public class SwitchDemo { - class object { + default object { public fun main(args: Array) { val month = 8 diff --git a/j2k/testData/fileOrElement/switch/nondefault.kt b/j2k/testData/fileOrElement/switch/nondefault.kt index 843c744739d..826751551ae 100644 --- a/j2k/testData/fileOrElement/switch/nondefault.kt +++ b/j2k/testData/fileOrElement/switch/nondefault.kt @@ -1,5 +1,5 @@ public class NonDefault { - class object { + default object { public fun main(args: Array) { val value = 3 diff --git a/j2k/testData/fileOrElement/trait/interfaceWithFields.kt b/j2k/testData/fileOrElement/trait/interfaceWithFields.kt index 0aa03719bf7..43a90b67e68 100644 --- a/j2k/testData/fileOrElement/trait/interfaceWithFields.kt +++ b/j2k/testData/fileOrElement/trait/interfaceWithFields.kt @@ -1,5 +1,5 @@ trait INode { - class object { + default object { public val IN: String = "in" public val AT: String = "@" public val COMMA_WITH_SPACE: String = COMMA + SPACE diff --git a/j2k/testData/fileOrElement/trait/interfaceWithStaticFields.kt b/j2k/testData/fileOrElement/trait/interfaceWithStaticFields.kt index 813f496d125..a454609a491 100644 --- a/j2k/testData/fileOrElement/trait/interfaceWithStaticFields.kt +++ b/j2k/testData/fileOrElement/trait/interfaceWithStaticFields.kt @@ -1,5 +1,5 @@ public trait INode { - class object { + default object { public val IN: String = "in" public val AT: String = "@" public val COMMA_WITH_SPACE: String = COMMA + SPACE diff --git a/j2k/testData/fileOrElement/typeParameters/rawTypeCast.kt b/j2k/testData/fileOrElement/typeParameters/rawTypeCast.kt index 7e828392d40..17dc095bcf2 100644 --- a/j2k/testData/fileOrElement/typeParameters/rawTypeCast.kt +++ b/j2k/testData/fileOrElement/typeParameters/rawTypeCast.kt @@ -2,7 +2,7 @@ import java.util.* class A { - class object { + default object { public fun foo(): Map { val props = Properties() return HashMap(props as Map) diff --git a/jps-plugin/testData/incremental/custom/kotlinConstantChangedUsedInJava/const.kt b/jps-plugin/testData/incremental/custom/kotlinConstantChangedUsedInJava/const.kt index a3b30360e52..dceaef294f2 100644 --- a/jps-plugin/testData/incremental/custom/kotlinConstantChangedUsedInJava/const.kt +++ b/jps-plugin/testData/incremental/custom/kotlinConstantChangedUsedInJava/const.kt @@ -1,7 +1,7 @@ package test class Klass { - class object { + default object { // Old and new constant values are different, but their hashes are the same val CONST = "BF" } diff --git a/jps-plugin/testData/incremental/custom/kotlinConstantChangedUsedInJava/const.kt.new b/jps-plugin/testData/incremental/custom/kotlinConstantChangedUsedInJava/const.kt.new index 8835b725265..bb50d7fc183 100644 --- a/jps-plugin/testData/incremental/custom/kotlinConstantChangedUsedInJava/const.kt.new +++ b/jps-plugin/testData/incremental/custom/kotlinConstantChangedUsedInJava/const.kt.new @@ -1,7 +1,7 @@ package test class Klass { - class object { + default object { // Old and new constant values are different, but their hashes are the same val CONST = "Ae" } diff --git a/jps-plugin/testData/incremental/custom/kotlinConstantUnchangedUsedInJava/const.kt b/jps-plugin/testData/incremental/custom/kotlinConstantUnchangedUsedInJava/const.kt index b13ee1c3c3b..7f4d76ba88b 100644 --- a/jps-plugin/testData/incremental/custom/kotlinConstantUnchangedUsedInJava/const.kt +++ b/jps-plugin/testData/incremental/custom/kotlinConstantUnchangedUsedInJava/const.kt @@ -1,7 +1,7 @@ package test class Klass { - class object { + default object { val CONST = "bar" } } diff --git a/jps-plugin/testData/incremental/custom/kotlinConstantUnchangedUsedInJava/const.kt.new b/jps-plugin/testData/incremental/custom/kotlinConstantUnchangedUsedInJava/const.kt.new index b13ee1c3c3b..7f4d76ba88b 100644 --- a/jps-plugin/testData/incremental/custom/kotlinConstantUnchangedUsedInJava/const.kt.new +++ b/jps-plugin/testData/incremental/custom/kotlinConstantUnchangedUsedInJava/const.kt.new @@ -1,7 +1,7 @@ package test class Klass { - class object { + default object { val CONST = "bar" } } diff --git a/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/const.kt b/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/const.kt index a3b30360e52..dceaef294f2 100644 --- a/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/const.kt +++ b/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/const.kt @@ -1,7 +1,7 @@ package test class Klass { - class object { + default object { // Old and new constant values are different, but their hashes are the same val CONST = "BF" } diff --git a/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/const.kt.new b/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/const.kt.new index 8835b725265..bb50d7fc183 100644 --- a/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/const.kt.new +++ b/jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/const.kt.new @@ -1,7 +1,7 @@ package test class Klass { - class object { + default object { // Old and new constant values are different, but their hashes are the same val CONST = "Ae" } diff --git a/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/const.kt b/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/const.kt index 8261acd68a1..3ce58ed9dc9 100644 --- a/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/const.kt +++ b/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/const.kt @@ -3,7 +3,7 @@ package test val CONST = "foo" class Klass { - class object { + default object { val CONST = "bar" } } diff --git a/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/const.kt.new b/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/const.kt.new index 8261acd68a1..3ce58ed9dc9 100644 --- a/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/const.kt.new +++ b/jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/const.kt.new @@ -3,7 +3,7 @@ package test val CONST = "foo" class Klass { - class object { + default object { val CONST = "bar" } } diff --git a/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/const.kt b/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/const.kt index 71c8e2eaa7c..dcbca7fe3a7 100644 --- a/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/const.kt +++ b/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/const.kt @@ -1,7 +1,7 @@ package test trait Trait { - class object { + default object { // Old and new constant values are different, but their hashes are the same val CONST = "BF" } diff --git a/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/const.kt.new b/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/const.kt.new index 0ef22fbf6b8..926b500fbf0 100644 --- a/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/const.kt.new +++ b/jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/const.kt.new @@ -1,7 +1,7 @@ package test trait Trait { - class object { + default object { // Old and new constant values are different, but their hashes are the same val CONST = "Ae" } diff --git a/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/const.kt b/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/const.kt index a3b30360e52..dceaef294f2 100644 --- a/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/const.kt +++ b/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/const.kt @@ -1,7 +1,7 @@ package test class Klass { - class object { + default object { // Old and new constant values are different, but their hashes are the same val CONST = "BF" } diff --git a/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/const.kt.new b/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/const.kt.new index 8835b725265..bb50d7fc183 100644 --- a/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/const.kt.new +++ b/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/const.kt.new @@ -1,7 +1,7 @@ package test class Klass { - class object { + default object { // Old and new constant values are different, but their hashes are the same val CONST = "Ae" } diff --git a/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/const.kt b/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/const.kt index b13ee1c3c3b..7f4d76ba88b 100644 --- a/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/const.kt +++ b/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/const.kt @@ -1,7 +1,7 @@ package test class Klass { - class object { + default object { val CONST = "bar" } } diff --git a/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/const.kt.new b/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/const.kt.new index b13ee1c3c3b..7f4d76ba88b 100644 --- a/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/const.kt.new +++ b/jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/const.kt.new @@ -1,7 +1,7 @@ package test class Klass { - class object { + default object { val CONST = "bar" } } diff --git a/js/js.libraries/src/core/dom.kt b/js/js.libraries/src/core/dom.kt index 87f5e3ea25a..745015ba126 100644 --- a/js/js.libraries/src/core/dom.kt +++ b/js/js.libraries/src/core/dom.kt @@ -93,7 +93,7 @@ native public trait DOMError { public val severity: Short public val type: String - public class object { + public default object { public val SEVERITY_ERROR: Short = 2 public val SEVERITY_FATAL_ERROR: Short = 3 public val SEVERITY_WARNING: Short = 1 @@ -221,7 +221,7 @@ native public trait Node { public fun replaceChild(arg1: Node, arg2: Node): Node = noImpl public fun setUserData(arg1: String?, arg2: Any, arg3: UserDataHandler): Any = noImpl - public class object { + public default object { public val ATTRIBUTE_NODE: Short = 2 public val CDATA_SECTION_NODE: Short = 4 public val COMMENT_NODE: Short = 8 @@ -270,7 +270,7 @@ native public trait TypeInfo { public val typeNamespace: String public fun isDerivedFrom(arg1: String?, arg2: String?, arg3: Int): Boolean = noImpl - public class object { + public default object { public val DERIVATION_EXTENSION: Int = 2 public val DERIVATION_LIST: Int = 8 public val DERIVATION_RESTRICTION: Int = 1 @@ -281,7 +281,7 @@ native public trait TypeInfo { native public trait UserDataHandler { public fun handle(arg1: Short, arg2: String?, arg3: Any, arg4: Node, arg5: Node): Unit = noImpl - public class object { + public default object { public val NODE_ADOPTED: Short = 5 public val NODE_CLONED: Short = 1 public val NODE_DELETED: Short = 3 diff --git a/js/js.libraries/src/core/domEvents.kt b/js/js.libraries/src/core/domEvents.kt index 7c766d78021..18285dfb5cc 100644 --- a/js/js.libraries/src/core/domEvents.kt +++ b/js/js.libraries/src/core/domEvents.kt @@ -29,7 +29,7 @@ native public trait Event { public fun preventDefault(): Unit = noImpl public fun stopPropagation(): Unit = noImpl - public class object { + public default object { public val AT_TARGET: Short = 2 public val BUBBLING_PHASE: Short = 3 public val CAPTURING_PHASE: Short = 1 @@ -64,7 +64,7 @@ native public trait MutationEvent: Event { public val relatedNode: Node public fun initMutationEvent(arg1: String?, arg2: Boolean, arg3: Boolean, arg4: Node, arg5: String?, arg6: String?, arg7: String?, arg8: Short): Unit = noImpl - public class object { + public default object { public val ADDITION: Short = 2 public val MODIFICATION: Short = 1 public val REMOVAL: Short = 3 diff --git a/js/js.translator/src/org/jetbrains/kotlin/js/translate/declaration/ClassTranslator.java b/js/js.translator/src/org/jetbrains/kotlin/js/translate/declaration/ClassTranslator.java index 83066d3ceb3..1430be32800 100644 --- a/js/js.translator/src/org/jetbrains/kotlin/js/translate/declaration/ClassTranslator.java +++ b/js/js.translator/src/org/jetbrains/kotlin/js/translate/declaration/ClassTranslator.java @@ -182,8 +182,8 @@ public final class ClassTranslator extends AbstractTranslator { declarationContext.aliasingContext().registerAlias(defaultObjectReceiver, defaultObjectAccessor); } - // Overlap alias of class object receiver for accessing from containing class(see previous if block), - // because inside class object we should use simple name for access. + // Overlap alias of default object receiver for accessing from containing class(see previous if block), + // because inside default object we should use simple name for access. if (isDefaultObject(descriptor)) { declarationContext = declarationContext.innerContextWithAliased(descriptor.getThisAsReceiverParameter(), JsLiteral.THIS); } diff --git a/js/js.translator/testData/callableReference/property/cases/kClassInstanceIsInitializedFirst.kt b/js/js.translator/testData/callableReference/property/cases/kClassInstanceIsInitializedFirst.kt index e36d494d7b5..2ba371ecaa0 100644 --- a/js/js.translator/testData/callableReference/property/cases/kClassInstanceIsInitializedFirst.kt +++ b/js/js.translator/testData/callableReference/property/cases/kClassInstanceIsInitializedFirst.kt @@ -4,7 +4,7 @@ package foo import kotlin.reflect.KMemberProperty class A { - class object { + default object { val ref: KMemberProperty = A::foo } diff --git a/js/js.translator/testData/classObject/cases/accessing.kt b/js/js.translator/testData/classObject/cases/accessing.kt index 564a8455dbb..99e3ce5f7a7 100644 --- a/js/js.translator/testData/classObject/cases/accessing.kt +++ b/js/js.translator/testData/classObject/cases/accessing.kt @@ -3,7 +3,7 @@ package foo class Foo() { - class object { + default object { val bar = "Foo.bar "; var boo = "FAIL"; fun baz() = "Foo.baz() " diff --git a/js/js.translator/testData/classObject/cases/inTrait.kt b/js/js.translator/testData/classObject/cases/inTrait.kt index 770e4c6554e..095c971cb7e 100644 --- a/js/js.translator/testData/classObject/cases/inTrait.kt +++ b/js/js.translator/testData/classObject/cases/inTrait.kt @@ -1,7 +1,7 @@ package foo trait A { - class object { + default object { val OK: String = "OK" } } diff --git a/js/js.translator/testData/classObject/cases/namedClassObject.kt b/js/js.translator/testData/classObject/cases/namedClassObject.kt index e0d4f75bcdf..69b0b458e65 100644 --- a/js/js.translator/testData/classObject/cases/namedClassObject.kt +++ b/js/js.translator/testData/classObject/cases/namedClassObject.kt @@ -1,13 +1,13 @@ package foo trait Named { - class object Bar { + default object Bar { val g = "a"; } } class Foo { - class object { + default object { val g = "b"; } } diff --git a/js/js.translator/testData/classObject/cases/setVar.kt b/js/js.translator/testData/classObject/cases/setVar.kt index 34f4ea6c794..80bb89bf8e0 100644 --- a/js/js.translator/testData/classObject/cases/setVar.kt +++ b/js/js.translator/testData/classObject/cases/setVar.kt @@ -2,7 +2,7 @@ package foo class A { var a = 3 - class object { + default object { var a = -2 } } diff --git a/js/js.translator/testData/classObject/cases/simple.kt b/js/js.translator/testData/classObject/cases/simple.kt index 708a192bb40..21ee2d15700 100644 --- a/js/js.translator/testData/classObject/cases/simple.kt +++ b/js/js.translator/testData/classObject/cases/simple.kt @@ -2,7 +2,7 @@ package foo class A { val a = 3 - class object { + default object { val a = 2 val b = 5 } diff --git a/js/js.translator/testData/classObject/cases/withInheritance.kt b/js/js.translator/testData/classObject/cases/withInheritance.kt index b18afc7ccc0..468edbecf9f 100644 --- a/js/js.translator/testData/classObject/cases/withInheritance.kt +++ b/js/js.translator/testData/classObject/cases/withInheritance.kt @@ -5,13 +5,13 @@ open class A { fun foo(): Int { return 5 } - class object: A() { + default object: A() { val c = a } } class B { - class object: A() { + default object: A() { } } diff --git a/js/js.translator/testData/closure/cases/closureInObject.kt b/js/js.translator/testData/closure/cases/closureInObject.kt index 9be41734929..2fe879ff30a 100644 --- a/js/js.translator/testData/closure/cases/closureInObject.kt +++ b/js/js.translator/testData/closure/cases/closureInObject.kt @@ -8,7 +8,7 @@ object A { } class B { - class object { + default object { val a = 21 fun foo() = 3 diff --git a/js/js.translator/testData/closure/cases/closureThisAndClassObject.kt b/js/js.translator/testData/closure/cases/closureThisAndClassObject.kt index 93157f91b68..f28e301fecc 100644 --- a/js/js.translator/testData/closure/cases/closureThisAndClassObject.kt +++ b/js/js.translator/testData/closure/cases/closureThisAndClassObject.kt @@ -2,7 +2,7 @@ package foo class A { fun foo() = "O" - class object { + default object { fun bar() = "K" } diff --git a/js/js.translator/testData/examples/sortedTests/unsupported/classObject.kt b/js/js.translator/testData/examples/sortedTests/unsupported/classObject.kt index 0e9a53ef70b..3a5db8d28b4 100644 --- a/js/js.translator/testData/examples/sortedTests/unsupported/classObject.kt +++ b/js/js.translator/testData/examples/sortedTests/unsupported/classObject.kt @@ -1,5 +1,5 @@ class C() { - class object { + default object { fun create() = C() } } diff --git a/js/js.translator/testData/examples/sortedTests/unsupported/classObjectInterface.kt b/js/js.translator/testData/examples/sortedTests/unsupported/classObjectInterface.kt index 9ca2f5d72b1..bdd8a02741e 100644 --- a/js/js.translator/testData/examples/sortedTests/unsupported/classObjectInterface.kt +++ b/js/js.translator/testData/examples/sortedTests/unsupported/classObjectInterface.kt @@ -1,7 +1,7 @@ class C() { fun getInstance(): Runnable = C - class object: Runnable { + default object: Runnable { override fun run(): Unit { } } diff --git a/js/js.translator/testData/examples/sortedTests/unsupported/classObjectMethod.kt b/js/js.translator/testData/examples/sortedTests/unsupported/classObjectMethod.kt index 9fe61a3c366..90351144818 100644 --- a/js/js.translator/testData/examples/sortedTests/unsupported/classObjectMethod.kt +++ b/js/js.translator/testData/examples/sortedTests/unsupported/classObjectMethod.kt @@ -3,11 +3,11 @@ abstract open class Default { } class MyInt() { - class object : Default { + default object : Default { override fun defaultValue(): Int = 610 } } -fun toDefault(t: T) where class object T : Default = T.defaultValue() +fun toDefault(t: T) where default object T : Default = T.defaultValue() fun box(): String = if (toDefault(MyInt()) == 610) "OK" else "fail" diff --git a/js/js.translator/testData/inline/cases/classObject.kt b/js/js.translator/testData/inline/cases/classObject.kt index 6e47d22197f..09f0ed0c097 100644 --- a/js/js.translator/testData/inline/cases/classObject.kt +++ b/js/js.translator/testData/inline/cases/classObject.kt @@ -15,7 +15,7 @@ class InlineAll { return s() } - class object { + default object { inline fun inline(s: () -> String): String { return s() } diff --git a/js/js.translator/testData/inlineMultiFile/cases/trait/trait.2.kt b/js/js.translator/testData/inlineMultiFile/cases/trait/trait.2.kt index 08a8ecdd25c..57a1aaf0196 100644 --- a/js/js.translator/testData/inlineMultiFile/cases/trait/trait.2.kt +++ b/js/js.translator/testData/inlineMultiFile/cases/trait/trait.2.kt @@ -11,7 +11,7 @@ trait InlineTrait { return s() } - class object { + default object { inline final fun finalInline(s: () -> String): String { return s() } diff --git a/js/js.translator/testData/native/cases/classObject.kt b/js/js.translator/testData/native/cases/classObject.kt index 3bcb8c55f21..a7ba29b1d75 100644 --- a/js/js.translator/testData/native/cases/classObject.kt +++ b/js/js.translator/testData/native/cases/classObject.kt @@ -3,7 +3,7 @@ package foo native class A(val c: Int) { native - class object { + default object { val g: Int = noImpl val c: String = noImpl } diff --git a/js/js.translator/testData/native/cases/nestedElements.kt b/js/js.translator/testData/native/cases/nestedElements.kt index ac3c763ba2a..f138226acc5 100644 --- a/js/js.translator/testData/native/cases/nestedElements.kt +++ b/js/js.translator/testData/native/cases/nestedElements.kt @@ -97,7 +97,7 @@ object Object { var b: String = noImpl fun test(): Int = noImpl - class object { + default object { val a: String = noImpl var b: String = noImpl fun test(): Int = noImpl @@ -109,7 +109,7 @@ object Object { var b: String = noImpl fun test(): Int = noImpl - class object { + default object { val a: String = noImpl var b: String = noImpl fun test(): Int = noImpl @@ -121,7 +121,7 @@ object Object { var b: String fun test(): Int = noImpl - class object { + default object { val a: String = noImpl var b: String = noImpl fun test(): Int = noImpl @@ -145,7 +145,7 @@ class Class { var b: String = noImpl fun test(): Int = noImpl - class object { + default object { val a: String = noImpl var b: String = noImpl fun test(): Int = noImpl @@ -162,14 +162,14 @@ class Class { var b: String fun test(): Int = noImpl - class object { + default object { val a: String = noImpl var b: String = noImpl fun test(): Int = noImpl } } - class object { + default object { native("aaa") val a: Trait = noImpl var b: String = noImpl @@ -190,7 +190,7 @@ trait Trait { var b: String = noImpl fun test(): Int = noImpl - class object { + default object { val a: String = noImpl var b: String = noImpl fun test(): Int = noImpl @@ -203,14 +203,14 @@ trait Trait { var b: String fun test(): Int = noImpl - class object { + default object { val a: String = noImpl var b: String = noImpl fun test(): Int = noImpl } } - class object { + default object { val a: Trait = noImpl var b: String = noImpl fun test(): Int = noImpl diff --git a/js/js.translator/testData/native/cases/vararg.kt b/js/js.translator/testData/native/cases/vararg.kt index 602342ef44c..febec4d2469 100644 --- a/js/js.translator/testData/native/cases/vararg.kt +++ b/js/js.translator/testData/native/cases/vararg.kt @@ -24,7 +24,7 @@ fun Bar.test2(order: Int, dummy: Int, vararg args: Int): Boolean = noImpl native class Bar(val size: Int, order: Int = 0) { fun test(order: Int, dummy: Int, vararg args: Int): Boolean = noImpl - class object { + default object { fun startNewTest(): Boolean = noImpl var hasOrderProblem: Boolean = false } diff --git a/js/js.translator/testData/object/cases/objectInObject.kt b/js/js.translator/testData/object/cases/objectInObject.kt index f310a4475cc..9533e996265 100644 --- a/js/js.translator/testData/object/cases/objectInObject.kt +++ b/js/js.translator/testData/object/cases/objectInObject.kt @@ -14,7 +14,7 @@ object B { } class C { - class object { + default object { fun ov() = "d" } object query { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunEnum.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunEnum.kt index 8721e8f3928..0f0f34b2591 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunEnum.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunEnum.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { fun enum() { enum() } fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunEval.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunEval.kt index 928f747ba3d..126b9e86b8d 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunEval.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunEval.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { fun eval() { eval() } fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunFor.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunFor.kt index a098c2aa257..92d756e63b8 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunFor.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunFor.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { fun `for`() { `for`() } fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunIf.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunIf.kt index 5305bab079e..97f48c05c4f 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunIf.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunIf.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { fun `if`() { `if`() } fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamExport.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamExport.kt index 3ed89bdd635..a8fa9258faf 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamExport.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamExport.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { fun foo(export: String) { assertEquals("123", export) testRenamed("export", { export }) diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamExtends.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamExtends.kt index 79b7f95f40a..dcb38899868 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamExtends.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamExtends.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { fun foo(extends: String) { assertEquals("123", extends) testRenamed("extends", { extends }) diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamIn.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamIn.kt index f38b8d10891..bd218f859d9 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamIn.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamIn.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { fun foo(`in`: String) { assertEquals("123", `in`) testRenamed("in", { `in` }) diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamNull.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamNull.kt index e15fd22fb70..1b5d84103df 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamNull.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectFunParamNull.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { fun foo(`null`: String) { assertEquals("123", `null`) testRenamed("null", { `null` }) diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelFinally.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelFinally.kt index fd7111b7f3a..f1d4de5b6a0 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelFinally.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelFinally.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { val t: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelFunction.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelFunction.kt index 27311fd39c6..571493e7bd0 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelFunction.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelFunction.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { val t: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelPackage.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelPackage.kt index 8b4cd379ddb..67ba1d4c326 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelPackage.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelPackage.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { val t: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelReturn.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelReturn.kt index f97fb1654f5..3408753b136 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelReturn.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectLabelReturn.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { val t: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectValConst.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectValConst.kt index efa02a2b5a3..bcfca887621 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectValConst.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectValConst.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { val const: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectValContinue.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectValContinue.kt index 347c33f1d5d..36b07200eb9 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectValContinue.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectValContinue.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { val `continue`: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectValDebugger.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectValDebugger.kt index f8bf3465e1f..9e2837a132c 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectValDebugger.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectValDebugger.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { val debugger: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectValDo.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectValDo.kt index e67464163f9..d4114a7d4fa 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectValDo.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectValDo.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { val `do`: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectVarDefault.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectVarDefault.kt index db7f223b898..86523af4868 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectVarDefault.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectVarDefault.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { var default: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectVarDelete.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectVarDelete.kt index 6bb32548b3a..4cbecb65204 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectVarDelete.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectVarDelete.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { var delete: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectVarElse.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectVarElse.kt index 2cd2906c083..bb08c30efd9 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectVarElse.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectVarElse.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { var `else`: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/insideClassObjectVarFalse.kt b/js/js.translator/testData/reservedWords/cases/insideClassObjectVarFalse.kt index 0f998fae4af..8677b2eed28 100644 --- a/js/js.translator/testData/reservedWords/cases/insideClassObjectVarFalse.kt +++ b/js/js.translator/testData/reservedWords/cases/insideClassObjectVarFalse.kt @@ -3,7 +3,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! class TestClass { - class object { + default object { var `false`: Int = 0 fun test() { diff --git a/js/js.translator/testData/reservedWords/cases/toplevelClassDelete.kt b/js/js.translator/testData/reservedWords/cases/toplevelClassDelete.kt index 211d240e5da..854fb7704b1 100644 --- a/js/js.translator/testData/reservedWords/cases/toplevelClassDelete.kt +++ b/js/js.translator/testData/reservedWords/cases/toplevelClassDelete.kt @@ -2,7 +2,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! -class delete { class object {} } +class delete { default object {} } fun box(): String { testNotRenamed("delete", { delete }) diff --git a/js/js.translator/testData/reservedWords/cases/toplevelClassEnum.kt b/js/js.translator/testData/reservedWords/cases/toplevelClassEnum.kt index 0ee048dcf5a..fc4b27fc850 100644 --- a/js/js.translator/testData/reservedWords/cases/toplevelClassEnum.kt +++ b/js/js.translator/testData/reservedWords/cases/toplevelClassEnum.kt @@ -2,7 +2,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! -class enum { class object {} } +class enum { default object {} } fun box(): String { testNotRenamed("enum", { enum }) diff --git a/js/js.translator/testData/reservedWords/cases/toplevelClassPackage.kt b/js/js.translator/testData/reservedWords/cases/toplevelClassPackage.kt index b0de714dfa9..4b4af94d385 100644 --- a/js/js.translator/testData/reservedWords/cases/toplevelClassPackage.kt +++ b/js/js.translator/testData/reservedWords/cases/toplevelClassPackage.kt @@ -2,7 +2,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! -class `package` { class object {} } +class `package` { default object {} } fun box(): String { testNotRenamed("package", { `package` }) diff --git a/js/js.translator/testData/reservedWords/cases/toplevelClassReturn.kt b/js/js.translator/testData/reservedWords/cases/toplevelClassReturn.kt index a7bdac31ef1..af9b8d25a15 100644 --- a/js/js.translator/testData/reservedWords/cases/toplevelClassReturn.kt +++ b/js/js.translator/testData/reservedWords/cases/toplevelClassReturn.kt @@ -2,7 +2,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! -class `return` { class object {} } +class `return` { default object {} } fun box(): String { testNotRenamed("return", { `return` }) diff --git a/js/js.translator/testData/reservedWords/cases/toplevelTraitEval.kt b/js/js.translator/testData/reservedWords/cases/toplevelTraitEval.kt index afc0b07a02d..99c532581a4 100644 --- a/js/js.translator/testData/reservedWords/cases/toplevelTraitEval.kt +++ b/js/js.translator/testData/reservedWords/cases/toplevelTraitEval.kt @@ -2,7 +2,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! -trait eval { class object {} } +trait eval { default object {} } fun box(): String { testNotRenamed("eval", { eval }) diff --git a/js/js.translator/testData/reservedWords/cases/toplevelTraitExport.kt b/js/js.translator/testData/reservedWords/cases/toplevelTraitExport.kt index 0bd0ef2c454..ea16b553d1f 100644 --- a/js/js.translator/testData/reservedWords/cases/toplevelTraitExport.kt +++ b/js/js.translator/testData/reservedWords/cases/toplevelTraitExport.kt @@ -2,7 +2,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! -trait export { class object {} } +trait export { default object {} } fun box(): String { testNotRenamed("export", { export }) diff --git a/js/js.translator/testData/reservedWords/cases/toplevelTraitSuper.kt b/js/js.translator/testData/reservedWords/cases/toplevelTraitSuper.kt index 6472cb6f6bf..670eb1fb486 100644 --- a/js/js.translator/testData/reservedWords/cases/toplevelTraitSuper.kt +++ b/js/js.translator/testData/reservedWords/cases/toplevelTraitSuper.kt @@ -2,7 +2,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! -trait `super` { class object {} } +trait `super` { default object {} } fun box(): String { testNotRenamed("super", { `super` }) diff --git a/js/js.translator/testData/reservedWords/cases/toplevelTraitThis.kt b/js/js.translator/testData/reservedWords/cases/toplevelTraitThis.kt index 3774f592f52..0bfe817d5ed 100644 --- a/js/js.translator/testData/reservedWords/cases/toplevelTraitThis.kt +++ b/js/js.translator/testData/reservedWords/cases/toplevelTraitThis.kt @@ -2,7 +2,7 @@ package foo // NOTE THIS FILE IS AUTO-GENERATED by the generateTestDataForReservedWords.kt. DO NOT EDIT! -trait `this` { class object {} } +trait `this` { default object {} } fun box(): String { testNotRenamed("this", { `this` }) diff --git a/libraries/sandbox/templatelib/src/TemplateHtml.kt b/libraries/sandbox/templatelib/src/TemplateHtml.kt index a6cdbb0ac03..52c63590115 100644 --- a/libraries/sandbox/templatelib/src/TemplateHtml.kt +++ b/libraries/sandbox/templatelib/src/TemplateHtml.kt @@ -28,12 +28,12 @@ abstract class Tag(val name : String) : Element() { val attributes = HashMap() protected fun initTag(init : T.()-> Unit) : T - where class object T : Factory { + where default object T : Factory { val tag = try { T.create() } catch (e: NullPointerException) { val typeName = javaClass.getName() - throw UnsupportedOperationException("No class object create() method for $typeName") + throw UnsupportedOperationException("No default object create() method for $typeName") } tag.init() children.add(tag) @@ -76,7 +76,7 @@ abstract class TagWithText(name : String) : Tag(name) { } class HTML() : TagWithText("html") { - class object : Factory { + default object : Factory { override fun create() = HTML() } @@ -86,7 +86,7 @@ class HTML() : TagWithText("html") { } class Head() : TagWithText("head") { - class object : Factory { + default object : Factory { override fun create() = Head() } @@ -94,7 +94,7 @@ class Head() : TagWithText("head") { } class Title() : TagWithText("title") { - class object : Factory { + default object : Factory<Title> { override fun create() = Title() } } @@ -103,7 +103,7 @@ abstract class BodyTag(name : String) : TagWithText(name) { } class Body() : BodyTag("body") { - class object : Factory<Body> { + default object : Factory<Body> { override fun create() = Body() } @@ -122,24 +122,24 @@ class Body() : BodyTag("body") { } class B() : BodyTag("b") { - class object : Factory<B> { + default object : Factory<B> { override fun create() = B() } } class P() : BodyTag("p") { - class object : Factory<P> { + default object : Factory<P> { override fun create() = P() } } class H1() : BodyTag("h1") { - class object : Factory<H1> { + default object : Factory<H1> { override fun create() = H1() } } class A() : BodyTag("a") { - class object : Factory<A> { + default object : Factory<A> { override fun create() = A() } diff --git a/libraries/sandbox/templatelib/test/TemplateHtmlTest.kt b/libraries/sandbox/templatelib/test/TemplateHtmlTest.kt index 71812b88ba5..c47b1c21cb5 100644 --- a/libraries/sandbox/templatelib/test/TemplateHtmlTest.kt +++ b/libraries/sandbox/templatelib/test/TemplateHtmlTest.kt @@ -42,7 +42,7 @@ html { } } -/** Create a bad element which doesn't have a class object create() method */ +/** Create a bad element which doesn't have a default object create() method */ class BadElem() : BodyTag("bad") { } diff --git a/libraries/stdlib/src/kotlin/concurrent/FunctionalList.kt b/libraries/stdlib/src/kotlin/concurrent/FunctionalList.kt index 3f5f969aa81..172c8b877f1 100644 --- a/libraries/stdlib/src/kotlin/concurrent/FunctionalList.kt +++ b/libraries/stdlib/src/kotlin/concurrent/FunctionalList.kt @@ -48,7 +48,7 @@ public abstract class FunctionalList<T>(public val size: Int) { private class Standard<T>(override val head: T, override val tail: FunctionalList<T>) : FunctionalList<T>(tail.size + 1) - class object { + default object { public fun <T> emptyList(): FunctionalList<T> = Empty<T>() public fun <T> of(element: T): FunctionalList<T> = FunctionalList.Standard<T>(element, emptyList()) diff --git a/libraries/tools/kotlin-js-tests-junit/src/test/kotlin/tests/SeleniumTestSuite.kt b/libraries/tools/kotlin-js-tests-junit/src/test/kotlin/tests/SeleniumTestSuite.kt index 5f0cb0d9cc1..f785363ca13 100644 --- a/libraries/tools/kotlin-js-tests-junit/src/test/kotlin/tests/SeleniumTestSuite.kt +++ b/libraries/tools/kotlin-js-tests-junit/src/test/kotlin/tests/SeleniumTestSuite.kt @@ -14,7 +14,7 @@ public class SeleniumTest(val id: String) { println("Testing $id") } - class object { + default object { Parameters public fun findSeleniumUris(): List<String> { return arrayList("a", "b") } diff --git a/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateJavaScriptStubs.kt b/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateJavaScriptStubs.kt index f35778d01a1..949e08ea82c 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateJavaScriptStubs.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateJavaScriptStubs.kt @@ -150,7 +150,7 @@ $imports if (fields != null) { if (fields.isNotEmpty()) { println("") - println(" public class object {") + println(" public default object {") for (field in fields) { if (field != null) { val modifiers = field.getModifiers() diff --git a/plugins/android-compiler-plugin/testData/codegen/android/fqNameInAttr/0.kt b/plugins/android-compiler-plugin/testData/codegen/android/fqNameInAttr/0.kt index 5dcf46252e8..2f5a02fc10c 100644 --- a/plugins/android-compiler-plugin/testData/codegen/android/fqNameInAttr/0.kt +++ b/plugins/android-compiler-plugin/testData/codegen/android/fqNameInAttr/0.kt @@ -8,7 +8,7 @@ import kotlinx.android.synthetic.layout.* class R { class id { - class object { + default object { val login = 5 } } diff --git a/plugins/android-compiler-plugin/testData/codegen/android/fqNameInAttr/1.kt b/plugins/android-compiler-plugin/testData/codegen/android/fqNameInAttr/1.kt index 0d63e306610..6a9f2085922 100644 --- a/plugins/android-compiler-plugin/testData/codegen/android/fqNameInAttr/1.kt +++ b/plugins/android-compiler-plugin/testData/codegen/android/fqNameInAttr/1.kt @@ -8,7 +8,7 @@ import kotlinx.android.synthetic.layout.* class R { class id { - class object { + default object { val login = 5 } } diff --git a/plugins/android-compiler-plugin/testData/codegen/android/fqNameInTag/0.kt b/plugins/android-compiler-plugin/testData/codegen/android/fqNameInTag/0.kt index 5dcf46252e8..2f5a02fc10c 100644 --- a/plugins/android-compiler-plugin/testData/codegen/android/fqNameInTag/0.kt +++ b/plugins/android-compiler-plugin/testData/codegen/android/fqNameInTag/0.kt @@ -8,7 +8,7 @@ import kotlinx.android.synthetic.layout.* class R { class id { - class object { + default object { val login = 5 } } diff --git a/plugins/android-compiler-plugin/testData/codegen/android/fqNameInTag/1.kt b/plugins/android-compiler-plugin/testData/codegen/android/fqNameInTag/1.kt index 0d63e306610..6a9f2085922 100644 --- a/plugins/android-compiler-plugin/testData/codegen/android/fqNameInTag/1.kt +++ b/plugins/android-compiler-plugin/testData/codegen/android/fqNameInTag/1.kt @@ -8,7 +8,7 @@ import kotlinx.android.synthetic.layout.* class R { class id { - class object { + default object { val login = 5 } } diff --git a/plugins/android-compiler-plugin/testData/codegen/android/multiFile/0.kt b/plugins/android-compiler-plugin/testData/codegen/android/multiFile/0.kt index 26e39121149..a3d611934e2 100644 --- a/plugins/android-compiler-plugin/testData/codegen/android/multiFile/0.kt +++ b/plugins/android-compiler-plugin/testData/codegen/android/multiFile/0.kt @@ -8,7 +8,7 @@ import kotlinx.android.synthetic.layout1.* class R { class id { - class object { + default object { val item_detail_container = 0 val textView1 = 1 val password = 2 diff --git a/plugins/android-compiler-plugin/testData/codegen/android/multiFile/1.kt b/plugins/android-compiler-plugin/testData/codegen/android/multiFile/1.kt index 9a584c51a6d..c430f310b0e 100644 --- a/plugins/android-compiler-plugin/testData/codegen/android/multiFile/1.kt +++ b/plugins/android-compiler-plugin/testData/codegen/android/multiFile/1.kt @@ -8,7 +8,7 @@ import kotlinx.android.synthetic.layout1.* class R { class id { - class object { + default object { val item_detail_container = 0 val textView1 = 1 val password = 2 diff --git a/plugins/android-compiler-plugin/testData/codegen/android/singleFile/0.kt b/plugins/android-compiler-plugin/testData/codegen/android/singleFile/0.kt index e8b8f6afdbf..6d6fd901ace 100644 --- a/plugins/android-compiler-plugin/testData/codegen/android/singleFile/0.kt +++ b/plugins/android-compiler-plugin/testData/codegen/android/singleFile/0.kt @@ -7,7 +7,7 @@ import kotlinx.android.synthetic.layout.* class R { class id { - class object { + default object { val item_detail_container = 0 val textView1 = 1 val password = 2 diff --git a/plugins/android-compiler-plugin/testData/codegen/android/singleFile/1.kt b/plugins/android-compiler-plugin/testData/codegen/android/singleFile/1.kt index f0f5babecb5..2480549d517 100644 --- a/plugins/android-compiler-plugin/testData/codegen/android/singleFile/1.kt +++ b/plugins/android-compiler-plugin/testData/codegen/android/singleFile/1.kt @@ -7,7 +7,7 @@ import kotlinx.android.synthetic.layout.* class R { class id { - class object { + default object { val item_detail_container = 0 val textView1 = 1 val password = 2 diff --git a/spec-docs/jvm-native-flag-support.md b/spec-docs/jvm-native-flag-support.md index cbaf70d3c8a..073eef81870 100644 --- a/spec-docs/jvm-native-flag-support.md +++ b/spec-docs/jvm-native-flag-support.md @@ -38,7 +38,7 @@ Intuition: a JVM method whose source declaration is native is marked with the `A A native member of an object marked `native` and `platformStatic` is translated in a straightforward way: there is only one JVM method corresponding to it, and it is marked as `ACC_NATIVE`. -A member of a class object of class `C` marked `native` and `platformStatic` yields two JVM methods: +A member of a default object of class `C` marked `native` and `platformStatic` yields two JVM methods: - static member of `C` that is marked `ACC_NATIVE`; - instance member of `C$object` that is not marked `ACC_NATIVE` and its body delegates to the native static method.