Fix highlighting range of diagnostic in test data

Because of ae3497c6ce
This commit is contained in:
Mikhail Zarechenskiy
2017-08-08 00:25:08 +03:00
parent 52f923c5ff
commit e2dcf47b3b
3 changed files with 5 additions and 5 deletions
@@ -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()
@@ -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 })
@@ -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>>>