Supported converting member properties to extensions

Additionally, we now generate <selection>throw UnsupportedOperationException()</selection> when a missing body is added
This commit is contained in:
Andrey Breslav
2013-08-27 13:22:15 +04:00
parent c02f0a7d04
commit 3002ac96f0
29 changed files with 304 additions and 42 deletions
@@ -2,4 +2,5 @@ abstract class Owner {
}
fun Owner.f() {
<caret><selection>throw UnsupportedOperationException()</selection>
}
@@ -0,0 +1,3 @@
abstract class Owner {
abstract val <caret>p: Int
}
@@ -0,0 +1,5 @@
abstract class Owner {
}
val Owner.p: Int
get() = <caret><selection>throw UnsupportedOperationException()</selection>
@@ -0,0 +1,3 @@
class Owner {
fun <caret>() {}
}
@@ -0,0 +1,5 @@
class Owner {
}
fun Owner.() {
}
@@ -0,0 +1,3 @@
class Owner<T> {
val <R> <caret>p: R
}
@@ -0,0 +1,5 @@
class Owner<T> {
}
val <T, R> Owner<T>.p: R
get() = <caret><selection>throw UnsupportedOperationException()</selection>
@@ -0,0 +1,4 @@
class Owner {
val <caret>p: Int
get
}
@@ -0,0 +1,5 @@
class Owner {
}
val Owner.p: Int
get() = <caret><selection>throw UnsupportedOperationException()</selection>
@@ -0,0 +1,4 @@
class Owner {
val <caret>p: Int
get() = 1
}
@@ -0,0 +1,5 @@
class Owner {
}
val Owner.p: Int
get() = 1
@@ -0,0 +1,4 @@
class Owner {
val <caret>p: Int
get() { return 1}
}
@@ -0,0 +1,7 @@
class Owner {
}
val Owner.p: Int
get() {
return 1
}
@@ -0,0 +1,5 @@
class Owner {
var <caret>p: Int
get
set
}
@@ -0,0 +1,8 @@
class Owner {
}
var Owner.p: Int
get() = <caret><selection>throw UnsupportedOperationException()</selection>
set(value) {
throw UnsupportedOperationException()
}
@@ -0,0 +1,5 @@
class Owner {
var <caret>p: Int
get() = 1
set
}
@@ -0,0 +1,8 @@
class Owner {
}
var Owner.p: Int
get() = 1
set(value) {
<caret><selection>throw UnsupportedOperationException()</selection>
}
@@ -0,0 +1,4 @@
class Owner {
var <caret>p: Int
get {return 1}
}
@@ -0,0 +1,10 @@
class Owner {
}
var Owner.p: Int
get {
return 1
}
set(value) {
<caret><selection>throw UnsupportedOperationException()</selection>
}
@@ -0,0 +1,5 @@
class Owner {
var <caret>p: Int
get() = 1
set(v) {}
}
@@ -0,0 +1,7 @@
class Owner {
}
var Owner.p: Int
get() = 1
set(v) {
}
@@ -0,0 +1,4 @@
class Owner {
var <caret>p: Int
set(v) {}
}
@@ -0,0 +1,7 @@
class Owner {
}
var Owner.p: Int
get() = <caret><selection>throw UnsupportedOperationException()</selection>
set(v) {
}