Disallow extension properties with backing fields

#KT-1682 Fixed
This commit is contained in:
Alexander Udalov
2014-05-28 19:17:31 +04:00
parent ea31f372aa
commit d78d4bc44c
72 changed files with 297 additions and 578 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ native public fun String.match(regex : String) : Array<String> = js.noImpl
native public fun String.trim() : String = js.noImpl
native("length")
public val CharSequence.size: Int = js.noImpl
public val CharSequence.size: Int get() = js.noImpl
library
public fun CharSequence.length(): Int = js.noImpl
+1 -1
View File
@@ -7,7 +7,7 @@ public fun createDocument(): Document {
return js.dom.html.document.implementation.createDocument(null, null, null)
}
native public val Node.outerHTML: String = js.noImpl
native public val Node.outerHTML: String get() = js.noImpl
/** Converts the node to an XML String */
public fun Node.toXmlString(): String = this.outerHTML
@@ -11,7 +11,7 @@ fun bar(): Any? {
}
native
val Exception.message: String = noImpl
val Exception.message: String get() = noImpl
fun box(): String {
val a: String? = null
@@ -10,7 +10,7 @@ var Test.b: Int
a = c - 1
}
val Test.d: Int = 44
val Test.d: Int get() = 44
fun box(): Boolean {
val c = Test()
@@ -5,8 +5,8 @@ fun Int.foo() {
fun String.foo() {
}
val Int.bar = 1
val String.bar = 2
val Int.bar: Int get() = 1
val String.bar: Int get() = 2
fun box(): String {
val a = 43
@@ -9,8 +9,8 @@ native("\"O\"") val foo: String = noImpl
native("boo") val bar: String = noImpl
class A
native("__proto__") val Any.proto: String = noImpl
native("__proto__") val A.proto: String = noImpl
native("__proto__") val Any.proto: String get() = noImpl
native("__proto__") val A.proto: String get() = noImpl
fun actual(foo: String, native("boo") bar: String) = foo + bar
fun expected(foo: String, boo: String) = foo + boo
@@ -5,8 +5,8 @@ val PACKAGE = "Kotlin.modules.JS_TESTS.foo"
native fun eval(e: String): Any? = noImpl
class A
native val Any.__proto__: String = noImpl
native val A.__proto__: String = noImpl
native val Any.__proto__: String get() = noImpl
native val A.__proto__: String get() = noImpl
fun box(): String {
val a = A()
@@ -3,9 +3,9 @@ package foo
class T
open class A {
open val T.foo: Int = 34
open val T.foo: Int
get() {
return $foo
return 34
}
fun test(): Int {
return T().foo
@@ -13,7 +13,7 @@ open class A {
}
class B : A() {
override val T.foo: Int = 5
override val T.foo: Int get() = 5
}
@@ -2,7 +2,7 @@
package foo
native val Exception.message: String = noImpl
native val Exception.message: String get() = noImpl
public fun <T : Throwable> failsWith(block: () -> Any): T {
try {