Fix highlighting range of diagnostic in test data
Because of ae3497c6ce
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
// SKIP_TXT
|
||||
class StateMachine<Q> internal constructor() {
|
||||
fun getInputStub(): Q = <!UNCHECKED_CAST!>null as Q<!>
|
||||
fun getInputStub(): Q = null <!UNCHECKED_CAST!>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 = <!UNCHECKED_CAST!>null as F<!>
|
||||
fun getInputStub(): F = null <!UNCHECKED_CAST!>as F<!>
|
||||
|
||||
fun createStateMachine(): StateMachine<F> = stateMachine {
|
||||
val letter = getInputStub()
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ fun foo() {
|
||||
|
||||
val x = { 1 }
|
||||
builder(<!TYPE_MISMATCH!>x<!>)
|
||||
builder(<!UNCHECKED_CAST!>{1} as (suspend () -> Int)<!>)
|
||||
builder({1} <!UNCHECKED_CAST!>as (suspend () -> Int)<!>)
|
||||
|
||||
var i: Int = 1
|
||||
i = genericBuilder({ 1 })
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ private fun <A> unaryOperation(
|
||||
functionName: String,
|
||||
operation: Function1<A, Any>,
|
||||
checker: Function1<Long, Long>
|
||||
) = UnaryOperationKey(a, functionName) to <!UNCHECKED_CAST!>Pair(operation, checker) as Pair<Function1<Any?, Any>, Function1<Long, Long>><!>
|
||||
) = UnaryOperationKey(a, functionName) to Pair(operation, checker) <!UNCHECKED_CAST!>as Pair<Function1<Any?, Any>, Function1<Long, Long>><!>
|
||||
|
||||
private fun <A, B> binaryOperation(
|
||||
a: CompileTimeType<A>,
|
||||
@@ -13,7 +13,7 @@ private fun <A, B> binaryOperation(
|
||||
functionName: String,
|
||||
operation: Function2<A, B, Any>,
|
||||
checker: Function2<BigInteger, BigInteger, BigInteger>
|
||||
) = BinaryOperationKey(a, b, functionName) to <!UNCHECKED_CAST!>Pair(operation, checker) as Pair<Function2<Any?, Any?, Any>, Function2<BigInteger, BigInteger, BigInteger>><!>
|
||||
) = BinaryOperationKey(a, b, functionName) to Pair(operation, checker) <!UNCHECKED_CAST!>as Pair<Function2<Any?, Any?, Any>, Function2<BigInteger, BigInteger, BigInteger>><!>
|
||||
|
||||
private data class UnaryOperationKey<A>(val f: CompileTimeType<out A>, val functionName: String)
|
||||
//HashMap<BinaryOperationKey<*, *>, Pair<Function2<Any?, Any?, Any>, Function2<BigInteger, BigInteger, BigInteger>>>
|
||||
|
||||
Reference in New Issue
Block a user