Refactor: process mentions of class object

Rename usages that refer to "default object" concept now
Test data file names are left as is
This commit is contained in:
Pavel V. Talanov
2015-03-03 17:28:24 +03:00
parent 27f5d71e4f
commit 48fbce9582
137 changed files with 471 additions and 479 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ class A {
class object {
val x = 1
}
<error descr="[MANY_CLASS_OBJECTS] Only one class object is allowed per class">class object Another</error> { // error
<error descr="[MANY_DEFAULT_OBJECTS] Only one default object is allowed per class">class object Another</error> { // error
val x = 1
}
}
@@ -14,7 +14,7 @@ class B() {
}
object b {
<error descr="[CLASS_OBJECT_NOT_ALLOWED] A class object is not allowed here">class object</error> {
<error descr="[DEFAULT_OBJECT_NOT_ALLOWED] A default object is not allowed here">class object</error> {
val x = 1
}
// error
@@ -18,13 +18,13 @@ class <error descr="[PLATFORM_STATIC_ILLEGAL_USAGE] This declaration does not su
fun test() {
val <warning descr="[UNUSED_VARIABLE] Variable 's' is never used">s</warning> = object {
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and class objects of classes can be annotated with 'platformStatic'">platformStatic fun a3()</error> {
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and default objects of classes can be annotated with 'platformStatic'">platformStatic fun a3()</error> {
}
}
}
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and class objects of classes can be annotated with 'platformStatic'">platformStatic fun a4()</error> {
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and default objects of classes can be annotated with 'platformStatic'">platformStatic fun a4()</error> {
}
}
@@ -32,7 +32,7 @@ class <error descr="[PLATFORM_STATIC_ILLEGAL_USAGE] This declaration does not su
platformStatic
trait <error descr="[PLATFORM_STATIC_ILLEGAL_USAGE] This declaration does not support 'platformStatic'">B</error> {
class object {
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and class objects of classes can be annotated with 'platformStatic'">platformStatic fun a1()</error> {
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and default objects of classes can be annotated with 'platformStatic'">platformStatic fun a1()</error> {
}
}
@@ -45,13 +45,13 @@ trait <error descr="[PLATFORM_STATIC_ILLEGAL_USAGE] This declaration does not su
fun test() {
val <warning descr="[UNUSED_VARIABLE] Variable 's' is never used">s</warning> = object {
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and class objects of classes can be annotated with 'platformStatic'">platformStatic fun a3()</error> {
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and default objects of classes can be annotated with 'platformStatic'">platformStatic fun a3()</error> {
}
}
}
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and class objects of classes can be annotated with 'platformStatic'">platformStatic fun a4()</error> {
<error descr="[PLATFORM_STATIC_NOT_IN_OBJECT] Only functions in named objects and default objects of classes can be annotated with 'platformStatic'">platformStatic fun a4()</error> {
}
}
@@ -33,7 +33,7 @@ PsiJetFileStubImpl[package=]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=Int]
CLASS_BODY:
OBJECT_DECLARATION:[fqName=Annotations.Default, isClassObject=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
OBJECT_DECLARATION:[fqName=Annotations.Default, isDefault=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
MODIFIER_LIST:[private]
ANNOTATION_ENTRY:[hasValueArguments=false, shortName=b]
CONSTRUCTOR_CALLEE:
@@ -7,7 +7,7 @@ PsiJetFileStubImpl[package=test.class_object]
MODIFIER_LIST:[internal final]
VALUE_PARAMETER_LIST:
CLASS_BODY:
OBJECT_DECLARATION:[fqName=test.class_object.ClassObject.Default, isClassObject=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
OBJECT_DECLARATION:[fqName=test.class_object.ClassObject.Default, isDefault=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
MODIFIER_LIST:[public]
CLASS_BODY:
PROPERTY:[fqName=test.class_object.ClassObject.Default.j, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReceiverTypeRef=false, hasReturnTypeRef=true, isProbablyNothingType=false, isTopLevel=false, isVar=false, name=j]
@@ -67,21 +67,21 @@ PsiJetFileStubImpl[package=test.class_object]
MODIFIER_LIST:[internal final]
VALUE_PARAMETER_LIST:
CLASS_BODY:
OBJECT_DECLARATION:[fqName=test.class_object.ClassObject.B.Default, isClassObject=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
OBJECT_DECLARATION:[fqName=test.class_object.ClassObject.B.Default, isDefault=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
MODIFIER_LIST:[internal]
CLASS_BODY:
CLASS:[fqName=test.class_object.ClassObject.B.Default.C, isEnumEntry=false, isLocal=false, isTopLevel=false, isTrait=false, name=C, superNames=[]]
MODIFIER_LIST:[internal final]
VALUE_PARAMETER_LIST:
CLASS_BODY:
OBJECT_DECLARATION:[fqName=test.class_object.ClassObject.B.Default.C.Default, isClassObject=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
OBJECT_DECLARATION:[fqName=test.class_object.ClassObject.B.Default.C.Default, isDefault=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
MODIFIER_LIST:[internal]
CLASS_BODY:
CLASS:[fqName=test.class_object.ClassObject.B.Default.C.Default.D, isEnumEntry=false, isLocal=false, isTopLevel=false, isTrait=false, name=D, superNames=[]]
MODIFIER_LIST:[internal final]
VALUE_PARAMETER_LIST:
CLASS_BODY:
OBJECT_DECLARATION:[fqName=test.class_object.ClassObject.B.Default.C.Default.D.Default, isClassObject=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
OBJECT_DECLARATION:[fqName=test.class_object.ClassObject.B.Default.C.Default.D.Default, isDefault=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
MODIFIER_LIST:[internal]
CLASS_BODY:
PROPERTY:[fqName=test.class_object.ClassObject.B.Default.C.Default.D.Default.i, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReceiverTypeRef=false, hasReturnTypeRef=true, isProbablyNothingType=false, isTopLevel=false, isVar=false, name=i]
@@ -35,7 +35,7 @@ PsiJetFileStubImpl[package=a.b.c.test.enum]
REFERENCE_EXPRESSION:[referencedName=enum]
REFERENCE_EXPRESSION:[referencedName=Enum]
CLASS_BODY:
OBJECT_DECLARATION:[fqName=a.b.c.test.enum.Enum.Default, isClassObject=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
OBJECT_DECLARATION:[fqName=a.b.c.test.enum.Enum.Default, isDefault=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
MODIFIER_LIST:[internal]
CLASS_BODY:
PROPERTY:[fqName=a.b.c.test.enum.Enum.Default.c, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReceiverTypeRef=false, hasReturnTypeRef=true, isProbablyNothingType=false, isTopLevel=false, isVar=false, name=c]
@@ -1,6 +1,6 @@
PsiJetFileStubImpl[package=]
PACKAGE_DIRECTIVE:
OBJECT_DECLARATION:[fqName=Objects, isClassObject=false, isLocal=false, isObjectLiteral=false, isTopLevel=true, name=Objects, superNames=[]]
OBJECT_DECLARATION:[fqName=Objects, isDefault=false, isLocal=false, isObjectLiteral=false, isTopLevel=true, name=Objects, superNames=[]]
MODIFIER_LIST:[public]
CLASS_BODY:
PROPERTY:[fqName=Objects.c, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReceiverTypeRef=false, hasReturnTypeRef=true, isProbablyNothingType=false, isTopLevel=false, isVar=false, name=c]
@@ -18,7 +18,7 @@ PsiJetFileStubImpl[package=]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=Unit]
OBJECT_DECLARATION:[fqName=Objects.InnerObject, isClassObject=false, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=InnerObject, superNames=[A]]
OBJECT_DECLARATION:[fqName=Objects.InnerObject, isDefault=false, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=InnerObject, superNames=[A]]
MODIFIER_LIST:[private]
DELEGATION_SPECIFIER_LIST:
DELEGATOR_SUPER_CLASS:
@@ -45,7 +45,7 @@ PsiJetFileStubImpl[package=]
MODIFIER_LIST:[open internal]
VALUE_PARAMETER_LIST:
CLASS_BODY:
OBJECT_DECLARATION:[fqName=Objects.OtherObject, isClassObject=false, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=OtherObject, superNames=[NestedClass]]
OBJECT_DECLARATION:[fqName=Objects.OtherObject, isDefault=false, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=OtherObject, superNames=[NestedClass]]
MODIFIER_LIST:[public]
DELEGATION_SPECIFIER_LIST:
DELEGATOR_SUPER_CLASS:
@@ -32,7 +32,7 @@ PsiJetFileStubImpl[package=test]
REFERENCE_EXPRESSION:[referencedName=test]
REFERENCE_EXPRESSION:[referencedName=T]
TYPE_CONSTRAINT_LIST:
TYPE_CONSTRAINT:[isClassObjectConstraint=false]
TYPE_CONSTRAINT:[isDefaultObjectConstraint=false]
REFERENCE_EXPRESSION:[referencedName=H]
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
@@ -46,14 +46,14 @@ PsiJetFileStubImpl[package=test]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=String]
TYPE_CONSTRAINT:[isClassObjectConstraint=false]
TYPE_CONSTRAINT:[isDefaultObjectConstraint=false]
REFERENCE_EXPRESSION:[referencedName=G]
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=CharSequence]
TYPE_CONSTRAINT:[isClassObjectConstraint=false]
TYPE_CONSTRAINT:[isDefaultObjectConstraint=false]
REFERENCE_EXPRESSION:[referencedName=C]
TYPE_REFERENCE:
NULLABLE_TYPE:
@@ -47,7 +47,7 @@ PsiJetFileStubImpl[package=test]
REFERENCE_EXPRESSION:[referencedName=Any]
VALUE_PARAMETER_LIST:
TYPE_CONSTRAINT_LIST:
TYPE_CONSTRAINT:[isClassObjectConstraint=false]
TYPE_CONSTRAINT:[isDefaultObjectConstraint=false]
REFERENCE_EXPRESSION:[referencedName=T1]
TYPE_REFERENCE:
NULLABLE_TYPE:
@@ -55,7 +55,7 @@ PsiJetFileStubImpl[package=test]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=Any]
TYPE_CONSTRAINT:[isClassObjectConstraint=false]
TYPE_CONSTRAINT:[isDefaultObjectConstraint=false]
REFERENCE_EXPRESSION:[referencedName=T1]
TYPE_REFERENCE:
NULLABLE_TYPE:
@@ -63,14 +63,14 @@ PsiJetFileStubImpl[package=test]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=Int]
TYPE_CONSTRAINT:[isClassObjectConstraint=false]
TYPE_CONSTRAINT:[isDefaultObjectConstraint=false]
REFERENCE_EXPRESSION:[referencedName=T1]
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=Int]
TYPE_CONSTRAINT:[isClassObjectConstraint=false]
TYPE_CONSTRAINT:[isDefaultObjectConstraint=false]
REFERENCE_EXPRESSION:[referencedName=T7]
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
@@ -353,14 +353,14 @@ PsiJetFileStubImpl[package=test]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=Unit]
TYPE_CONSTRAINT_LIST:
TYPE_CONSTRAINT:[isClassObjectConstraint=false]
TYPE_CONSTRAINT:[isDefaultObjectConstraint=false]
REFERENCE_EXPRESSION:[referencedName=G3]
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=kotlin]
REFERENCE_EXPRESSION:[referencedName=String]
TYPE_CONSTRAINT:[isClassObjectConstraint=false]
TYPE_CONSTRAINT:[isDefaultObjectConstraint=false]
REFERENCE_EXPRESSION:[referencedName=G3]
TYPE_REFERENCE:
NULLABLE_TYPE:
@@ -1,5 +1,5 @@
// "Import" "true"
// ERROR: Please specify constructor invocation; classifier 'ArrayList' does not have a class object
// ERROR: Please specify constructor invocation; classifier 'ArrayList' does not have a default object
// KT-4000
@@ -1,5 +1,5 @@
// "Import" "true"
// ERROR: Please specify constructor invocation; classifier 'ArrayList' does not have a class object
// ERROR: Please specify constructor invocation; classifier 'ArrayList' does not have a default object
// KT-4000
+1 -1
View File
@@ -3,7 +3,7 @@ PsiJetFileStubImpl[package=]
CLASS:[fqName=A, isEnumEntry=false, isLocal=false, isTopLevel=true, isTrait=false, name=A, superNames=[]]
CLASS:[fqName=T, isEnumEntry=false, isLocal=false, isTopLevel=true, isTrait=true, name=T, superNames=[]]
PROPERTY:[fqName=obj, hasDelegate=false, hasDelegateExpression=false, hasInitializer=true, hasReceiverTypeRef=false, hasReturnTypeRef=false, isProbablyNothingType=false, isTopLevel=true, isVar=false, name=obj]
OBJECT_DECLARATION:[fqName=null, isClassObject=false, isLocal=true, isObjectLiteral=true, isTopLevel=false, name=null, superNames=[A, T]]
OBJECT_DECLARATION:[fqName=null, isDefault=false, isLocal=true, isObjectLiteral=true, isTopLevel=false, name=null, superNames=[A, T]]
DELEGATION_SPECIFIER_LIST:
DELEGATOR_SUPER_CALL:
CONSTRUCTOR_CALLEE:
+1 -1
View File
@@ -2,7 +2,7 @@ PsiJetFileStubImpl[package=]
PACKAGE_DIRECTIVE:
CLASS:[fqName=C, isEnumEntry=false, isLocal=false, isTopLevel=true, isTrait=false, name=C, superNames=[]]
CLASS_BODY:
OBJECT_DECLARATION:[fqName=C.Default, isClassObject=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
OBJECT_DECLARATION:[fqName=C.Default, isDefault=true, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Default, superNames=[]]
CLASS_BODY:
FUN:[fqName=C.Default.foo, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isProbablyNothingType=false, isTopLevel=false, name=foo]
VALUE_PARAMETER_LIST:
@@ -1,6 +1,6 @@
PsiJetFileStubImpl[package=]
PACKAGE_DIRECTIVE:
OBJECT_DECLARATION:[fqName=<no name>, isClassObject=false, isLocal=false, isObjectLiteral=false, isTopLevel=true, name=null, superNames=[]]
OBJECT_DECLARATION:[fqName=<no name>, isDefault=false, isLocal=false, isObjectLiteral=false, isTopLevel=true, name=null, superNames=[]]
CLASS_BODY:
FUN:[fqName=null, hasBlockBody=false, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isProbablyNothingType=false, isTopLevel=false, name=testing]
VALUE_PARAMETER_LIST:
@@ -4,7 +4,7 @@ PsiJetFileStubImpl[package=]
CLASS:[fqName=T, isEnumEntry=false, isLocal=false, isTopLevel=true, isTrait=true, name=T, superNames=[]]
FUN:[fqName=foo, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isProbablyNothingType=false, isTopLevel=true, name=foo]
VALUE_PARAMETER_LIST:
OBJECT_DECLARATION:[fqName=null, isClassObject=false, isLocal=true, isObjectLiteral=false, isTopLevel=false, name=O, superNames=[A, T]]
OBJECT_DECLARATION:[fqName=null, isDefault=false, isLocal=true, isObjectLiteral=false, isTopLevel=false, name=O, superNames=[A, T]]
DELEGATION_SPECIFIER_LIST:
DELEGATOR_SUPER_CALL:
CONSTRUCTOR_CALLEE:
@@ -2,7 +2,7 @@ PsiJetFileStubImpl[package=]
PACKAGE_DIRECTIVE:
FUN:[fqName=f, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isProbablyNothingType=false, isTopLevel=true, name=f]
VALUE_PARAMETER_LIST:
OBJECT_DECLARATION:[fqName=null, isClassObject=false, isLocal=true, isObjectLiteral=false, isTopLevel=false, name=foo, superNames=[]]
OBJECT_DECLARATION:[fqName=null, isDefault=false, isLocal=true, isObjectLiteral=false, isTopLevel=false, name=foo, superNames=[]]
CLASS_BODY:
FUN:[fqName=null, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isProbablyNothingType=false, isTopLevel=false, name=foo]
VALUE_PARAMETER_LIST:
+1 -1
View File
@@ -2,7 +2,7 @@ PsiJetFileStubImpl[package=]
PACKAGE_DIRECTIVE:
CLASS:[fqName=A, isEnumEntry=false, isLocal=false, isTopLevel=true, isTrait=false, name=A, superNames=[]]
CLASS:[fqName=T, isEnumEntry=false, isLocal=false, isTopLevel=true, isTrait=true, name=T, superNames=[]]
OBJECT_DECLARATION:[fqName=Test, isClassObject=false, isLocal=false, isObjectLiteral=false, isTopLevel=true, name=Test, superNames=[A, T]]
OBJECT_DECLARATION:[fqName=Test, isDefault=false, isLocal=false, isObjectLiteral=false, isTopLevel=true, name=Test, superNames=[A, T]]
DELEGATION_SPECIFIER_LIST:
DELEGATOR_SUPER_CALL:
CONSTRUCTOR_CALLEE:
@@ -1,7 +1,7 @@
PsiJetFileStubImpl[package=]
PACKAGE_DIRECTIVE:
PROPERTY:[fqName=p, hasDelegate=false, hasDelegateExpression=false, hasInitializer=true, hasReceiverTypeRef=false, hasReturnTypeRef=false, isProbablyNothingType=false, isTopLevel=true, isVar=false, name=p]
OBJECT_DECLARATION:[fqName=null, isClassObject=false, isLocal=true, isObjectLiteral=true, isTopLevel=false, name=null, superNames=[]]
OBJECT_DECLARATION:[fqName=null, isDefault=false, isLocal=true, isObjectLiteral=true, isTopLevel=false, name=null, superNames=[]]
CLASS_BODY:
FUN:[fqName=null, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isProbablyNothingType=false, isTopLevel=false, name=f]
VALUE_PARAMETER_LIST:
@@ -1,7 +1,7 @@
PsiJetFileStubImpl[package=]
PACKAGE_DIRECTIVE:
PROPERTY:[fqName=p, hasDelegate=true, hasDelegateExpression=true, hasInitializer=false, hasReceiverTypeRef=false, hasReturnTypeRef=false, isProbablyNothingType=false, isTopLevel=true, isVar=false, name=p]
OBJECT_DECLARATION:[fqName=null, isClassObject=false, isLocal=true, isObjectLiteral=true, isTopLevel=false, name=null, superNames=[]]
OBJECT_DECLARATION:[fqName=null, isDefault=false, isLocal=true, isObjectLiteral=true, isTopLevel=false, name=null, superNames=[]]
CLASS_BODY:
FUN:[fqName=null, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isProbablyNothingType=false, isTopLevel=false, name=f]
VALUE_PARAMETER_LIST: