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:
@@ -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
|
||||
}
|
||||
+5
@@ -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
|
||||
}
|
||||
+5
@@ -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
|
||||
}
|
||||
+5
@@ -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
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
class Owner {
|
||||
val <caret>p: Int
|
||||
get() { return 1}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Owner {
|
||||
}
|
||||
|
||||
val Owner.p: Int
|
||||
get() {
|
||||
return 1
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class Owner {
|
||||
var <caret>p: Int
|
||||
get
|
||||
set
|
||||
}
|
||||
+8
@@ -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
|
||||
}
|
||||
+8
@@ -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>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class Owner {
|
||||
var <caret>p: Int
|
||||
get() = 1
|
||||
set(v) {}
|
||||
}
|
||||
+7
@@ -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) {
|
||||
}
|
||||
Reference in New Issue
Block a user