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
This commit is contained in:
Pavel V. Talanov
2015-03-06 12:51:59 +03:00
parent 28ed30bcb3
commit 59f192ef90
794 changed files with 1120 additions and 1109 deletions
+4 -4
View File
@@ -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
+2 -2
View File
@@ -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
@@ -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);
}
@@ -4,7 +4,7 @@ package foo
import kotlin.reflect.KMemberProperty
class A {
class object {
default object {
val ref: KMemberProperty<A, String> = A::foo
}
@@ -3,7 +3,7 @@
package foo
class Foo() {
class object {
default object {
val bar = "Foo.bar ";
var boo = "FAIL";
fun baz() = "Foo.baz() "
@@ -1,7 +1,7 @@
package foo
trait A {
class object {
default object {
val OK: String = "OK"
}
}
@@ -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";
}
}
@@ -2,7 +2,7 @@ package foo
class A {
var a = 3
class object {
default object {
var a = -2
}
}
@@ -2,7 +2,7 @@ package foo
class A {
val a = 3
class object {
default object {
val a = 2
val b = 5
}
@@ -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() {
}
}
@@ -8,7 +8,7 @@ object A {
}
class B {
class object {
default object {
val a = 21
fun foo() = 3
@@ -2,7 +2,7 @@ package foo
class A {
fun foo() = "O"
class object {
default object {
fun bar() = "K"
}
@@ -1,5 +1,5 @@
class C() {
class object {
default object {
fun create() = C()
}
}
@@ -1,7 +1,7 @@
class C() {
fun getInstance(): Runnable = C
class object: Runnable {
default object: Runnable {
override fun run(): Unit {
}
}
@@ -3,11 +3,11 @@ abstract open class Default {
}
class MyInt() {
class object : Default {
default object : Default {
override fun defaultValue(): Int = 610
}
}
fun toDefault<T : Any>(t: T) where class object T : Default = T.defaultValue()
fun toDefault<T : Any>(t: T) where default object T : Default = T.defaultValue()
fun box(): String = if (toDefault<MyInt>(MyInt()) == 610) "OK" else "fail"
@@ -15,7 +15,7 @@ class InlineAll {
return s()
}
class object {
default object {
inline fun inline(s: () -> String): String {
return s()
}
@@ -11,7 +11,7 @@ trait InlineTrait {
return s()
}
class object {
default object {
inline final fun finalInline(s: () -> String): String {
return s()
}
@@ -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
}
@@ -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
@@ -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
}
@@ -14,7 +14,7 @@ object B {
}
class C {
class object {
default object {
fun ov() = "d"
}
object query {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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 })
@@ -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 })
@@ -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` })
@@ -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` })
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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() {
@@ -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 })
@@ -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 })
@@ -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` })
@@ -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` })
@@ -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 })
@@ -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 })
@@ -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` })
@@ -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` })