Get rid of 'class object' usages in code and builtins
Replace some comments and library usages as well
This commit is contained in:
@@ -80,7 +80,7 @@ public open class JsFunctionScope(parent: JsScope, description: String) : JsScop
|
||||
|| getParent()?.hasOwnName(name) ?: false
|
||||
}
|
||||
|
||||
class object {
|
||||
companion object {
|
||||
public val RESERVED_WORDS: Set<String> = setOf(
|
||||
// keywords
|
||||
"await", "break", "case", "catch", "continue", "debugger", "default", "delete", "do", "else", "finally", "for", "function", "if",
|
||||
|
||||
@@ -28,7 +28,7 @@ public enum class PredefinedAnnotation(fqName: String) {
|
||||
|
||||
public val fqName: FqName = FqName(fqName)
|
||||
|
||||
class object {
|
||||
companion object {
|
||||
// TODO: replace with straight assignment when KT-5761 will be fixed
|
||||
val WITH_CUSTOM_NAME by Delegates.lazy { setOf(LIBRARY, NATIVE) }
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class JsAnalysisResult(
|
||||
moduleDescriptor: ModuleDescriptor
|
||||
) : AnalysisResult(bindingTrace.getBindingContext(), moduleDescriptor) {
|
||||
|
||||
class object {
|
||||
companion object {
|
||||
platformStatic public fun success(trace: BindingTrace, module: ModuleDescriptor): JsAnalysisResult {
|
||||
return JsAnalysisResult(trace, module)
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ import org.jetbrains.kotlin.resolve.TemporaryBindingTrace
|
||||
|
||||
public class JsCallChecker : CallChecker {
|
||||
|
||||
class object {
|
||||
companion object {
|
||||
private val JS_PATTERN: DescriptorPredicate = PatternBuilder.pattern("kotlin.js.js(String)")
|
||||
|
||||
platformStatic
|
||||
|
||||
@@ -93,7 +93,7 @@ native public trait DOMError {
|
||||
public val severity: Short
|
||||
public val type: String
|
||||
|
||||
public class object {
|
||||
public companion 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 companion 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 companion 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 companion object {
|
||||
public val NODE_ADOPTED: Short = 5
|
||||
public val NODE_CLONED: Short = 1
|
||||
public val NODE_DELETED: Short = 3
|
||||
|
||||
@@ -29,7 +29,7 @@ native public trait Event {
|
||||
public fun preventDefault(): Unit = noImpl
|
||||
public fun stopPropagation(): Unit = noImpl
|
||||
|
||||
public class object {
|
||||
public companion 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 companion object {
|
||||
public val ADDITION: Short = 2
|
||||
public val MODIFICATION: Short = 1
|
||||
public val REMOVAL: Short = 3
|
||||
|
||||
@@ -9,7 +9,7 @@ class TImpl(val v: String) : T {
|
||||
}
|
||||
|
||||
class A {
|
||||
class object : T by TImpl("A.Default")
|
||||
companion object : T by TImpl("A.Default")
|
||||
}
|
||||
|
||||
object B : T by TImpl("B")
|
||||
|
||||
Reference in New Issue
Block a user