Prohibit check for instance of a non-reified, non-subtype type parameter
#KT-12683 Fixed #KT-9986 Fixed
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
// SKIP_TXT
|
||||
class StateMachine<Q> internal constructor() {
|
||||
fun getInputStub(): Q = null as Q
|
||||
fun getInputStub(): Q = <!UNCHECKED_CAST!>null as Q<!>
|
||||
}
|
||||
|
||||
fun <T> stateMachine(<!UNUSED_PARAMETER!>block<!>: suspend StateMachine<T>.() -> Unit): StateMachine<T> {
|
||||
@@ -8,7 +8,7 @@ fun <T> stateMachine(<!UNUSED_PARAMETER!>block<!>: suspend StateMachine<T>.() ->
|
||||
}
|
||||
|
||||
class Problem<F>(){
|
||||
fun getInputStub(): F = null as F
|
||||
fun getInputStub(): F = <!UNCHECKED_CAST!>null as F<!>
|
||||
|
||||
fun createStateMachine(): StateMachine<F> = stateMachine {
|
||||
val letter = getInputStub()
|
||||
|
||||
Reference in New Issue
Block a user