Implement property uses throw UnsupportedOperationException() instead of default value or ?
This commit is contained in:
@@ -22,7 +22,7 @@ class C : Base<String, C, Unit>() {
|
||||
}
|
||||
|
||||
override val method: (String?) -> String
|
||||
get() = ?
|
||||
get() = throw UnsupportedOperationException()
|
||||
|
||||
override fun toString(): String {
|
||||
return super.toString()
|
||||
|
||||
@@ -4,9 +4,9 @@ trait A {
|
||||
}
|
||||
|
||||
fun some() : A {
|
||||
return object : A {<caret>
|
||||
return object : A {
|
||||
override val method: () -> Unit?
|
||||
get() = ?
|
||||
get() = <selection><caret>throw UnsupportedOperationException()</selection>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,21 +24,21 @@ class C : A(), B {
|
||||
}
|
||||
|
||||
override val internalProperty: Int
|
||||
get() = 0
|
||||
get() = throw UnsupportedOperationException()
|
||||
|
||||
override fun protectedFun() {
|
||||
super<A>.protectedFun()
|
||||
}
|
||||
|
||||
override val protectedProperty: Int
|
||||
get() = 0
|
||||
get() = throw UnsupportedOperationException()
|
||||
|
||||
override fun publicFun() {
|
||||
super<A>.publicFun()
|
||||
}
|
||||
|
||||
override val publicProperty: Int
|
||||
get() = 0
|
||||
get() = throw UnsupportedOperationException()
|
||||
|
||||
override fun toString(): String {
|
||||
return super<A>.toString()
|
||||
|
||||
@@ -4,5 +4,5 @@ trait A {
|
||||
|
||||
class B : A {
|
||||
override val String.prop: Int
|
||||
get() = <selection><caret>0</selection>
|
||||
get() = <selection><caret>throw UnsupportedOperationException()</selection>
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ open class A() {
|
||||
}
|
||||
|
||||
fun some() : A {
|
||||
return object : A() {<caret>
|
||||
return object : A() {
|
||||
override val method: () -> Unit?
|
||||
get() = ?
|
||||
get() = <selection><caret>throw UnsupportedOperationException()</selection>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ trait A {
|
||||
|
||||
class B : A {
|
||||
override var Int.foo: Double
|
||||
get() = <selection><caret>0.0</selection>
|
||||
get() = <selection><caret>throw UnsupportedOperationException()</selection>
|
||||
set(value) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,19 +11,19 @@ trait T {
|
||||
|
||||
class C : T {
|
||||
override val a1: Byte
|
||||
get() = <selection><caret>0</selection>
|
||||
get() = <selection><caret>throw UnsupportedOperationException()</selection>
|
||||
override val a2: Short
|
||||
get() = 0
|
||||
get() = throw UnsupportedOperationException()
|
||||
override val a3: Int
|
||||
get() = 0
|
||||
get() = throw UnsupportedOperationException()
|
||||
override val a4: Long
|
||||
get() = 0
|
||||
get() = throw UnsupportedOperationException()
|
||||
override val a5: Float
|
||||
get() = 0.0f
|
||||
get() = throw UnsupportedOperationException()
|
||||
override val a6: Double
|
||||
get() = 0.0
|
||||
get() = throw UnsupportedOperationException()
|
||||
override val a7: Char
|
||||
get() = '\u0000'
|
||||
get() = throw UnsupportedOperationException()
|
||||
override val a8: Boolean
|
||||
get() = false
|
||||
get() = throw UnsupportedOperationException()
|
||||
}
|
||||
@@ -7,7 +7,7 @@ class C : A() {
|
||||
val constant = 42
|
||||
// Some comment
|
||||
override val bar: Int
|
||||
get() = <selection><caret>0</selection>
|
||||
get() = <selection><caret>throw UnsupportedOperationException()</selection>
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return super.equals(other)
|
||||
|
||||
@@ -4,5 +4,5 @@ trait T {
|
||||
|
||||
class GC() : T {
|
||||
override val v: Int
|
||||
get() = <selection><caret>0</selection>
|
||||
get() = <selection><caret>throw UnsupportedOperationException()</selection>
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ class SomeTest : Test {
|
||||
}
|
||||
|
||||
override val testProp: Int
|
||||
get() = 0
|
||||
get() = throw UnsupportedOperationException()
|
||||
|
||||
/**
|
||||
* test
|
||||
|
||||
Reference in New Issue
Block a user