Replace 'class object' with default object in project code

This commit is contained in:
Pavel V. Talanov
2015-03-10 15:33:19 +03:00
parent dc7bb32a3b
commit 9ecf95532e
118 changed files with 130 additions and 130 deletions
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.name.Name
// The purpose of this class is to hold a unique signature of either a method or a field, so that annotations on a member can be put
// into a map indexed by these signatures
data class MemberSignature private(private val signature: String) {
class object {
default object {
platformStatic public fun fromMethodNameAndDesc(nameAndDesc: String): MemberSignature {
return MemberSignature(nameAndDesc)
}
@@ -26,7 +26,7 @@ public trait Annotations : Iterable<AnnotationDescriptor> {
public fun findAnnotation(fqName: FqName): AnnotationDescriptor?
class object {
default object {
public val EMPTY: Annotations = object : Annotations {
override fun isEmpty() = true
@@ -76,7 +76,7 @@ public trait JetScope {
}
}
class object {
default object {
public val ALL_NAME_FILTER: (Name) -> Boolean = { true }
}
}
@@ -141,7 +141,7 @@ public class DescriptorKindFilter(
}
}
class object {
default object {
public val NON_SINGLETON_CLASSIFIERS_MASK: Int = 0x01
public val SINGLETON_CLASSIFIERS_MASK: Int = 0x02
public val PACKAGES_MASK: Int = 0x04
@@ -33,7 +33,7 @@ public trait FlexibleTypeCapabilities {
}
public trait Flexibility : TypeCapability, SubtypingRepresentatives {
class object {
default object {
// This is a "magic" classifier: when type resolver sees it in the code, e.g. ft<Foo, Foo?>, instead of creating a normal type,
// it creates a flexible type, e.g. (Foo..Foo?).
// This is used in tests and Evaluate Expression to have flexible types in the code,
@@ -145,7 +145,7 @@ public open class DelegatingFlexibleType protected (
override val upperBound: JetType,
override val extraCapabilities: FlexibleTypeCapabilities
) : DelegatingType(), NullAwareness, Flexibility, FlexibleTypeDelegation, Approximation {
class object {
default object {
platformStatic fun create(lowerBound: JetType, upperBound: JetType, extraCapabilities: FlexibleTypeCapabilities): JetType {
if (lowerBound == upperBound) return lowerBound
return DelegatingFlexibleType(lowerBound, upperBound, extraCapabilities)