[NI] Update calls after inference for coroutines
This commit is contained in:
+1
@@ -1,5 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
class Controller<T> {
|
||||
suspend fun yield(t: T) {}
|
||||
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
package
|
||||
|
||||
public val test1: kotlin.Int
|
||||
public val test2: A
|
||||
public val test3: A
|
||||
public fun </*0*/ S> generate(/*0*/ g: suspend Controller<S>.() -> kotlin.Unit): S
|
||||
|
||||
public interface A {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object B : A {
|
||||
private constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object C : A {
|
||||
private constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Controller</*0*/ T> {
|
||||
public constructor Controller</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final suspend fun yield(/*0*/ t: T): kotlin.Unit
|
||||
}
|
||||
Vendored
+20
-3
@@ -1,8 +1,25 @@
|
||||
package
|
||||
|
||||
public val test1: kotlin.Int
|
||||
public val test2: A
|
||||
public val test3: A
|
||||
public val test1: [ERROR : Type for generate {
|
||||
apply {
|
||||
yield(4)
|
||||
}
|
||||
}]
|
||||
public val test2: [ERROR : Type for generate {
|
||||
yield(B)
|
||||
apply {
|
||||
yield(C)
|
||||
}
|
||||
}]
|
||||
public val test3: [ERROR : Type for generate {
|
||||
this.let {
|
||||
yield(B)
|
||||
}
|
||||
|
||||
apply {
|
||||
yield(C)
|
||||
}
|
||||
}]
|
||||
public fun </*0*/ S> generate(/*0*/ g: suspend Controller<S>.() -> kotlin.Unit): S
|
||||
|
||||
public interface A {
|
||||
|
||||
+5
-3
@@ -1,4 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
class GenericController<T> {
|
||||
suspend fun yield(t: T) {}
|
||||
@@ -14,17 +16,17 @@ val test1 = generate {
|
||||
yield(3)
|
||||
}
|
||||
|
||||
val test2 = <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
val test2 = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
yield(3)
|
||||
notYield(3)
|
||||
}
|
||||
|
||||
val test3 = <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
val test3 = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
yield(3)
|
||||
yieldBarReturnType(3)
|
||||
}
|
||||
|
||||
val test4 = <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
val test4 = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
yield(3)
|
||||
barReturnType()
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package
|
||||
|
||||
public val test1: kotlin.collections.List<kotlin.Int>
|
||||
public val test2: kotlin.collections.List<kotlin.Int>
|
||||
public val test3: kotlin.collections.List<kotlin.Int>
|
||||
public val test4: kotlin.collections.List<kotlin.Int>
|
||||
public fun </*0*/ S> generate(/*0*/ g: suspend GenericController<S>.() -> kotlin.Unit): kotlin.collections.List<S>
|
||||
|
||||
public final class GenericController</*0*/ T> {
|
||||
public constructor GenericController</*0*/ T>()
|
||||
public final fun barReturnType(): T
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun notYield(/*0*/ t: T): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final suspend fun yield(/*0*/ t: T): kotlin.Unit
|
||||
public final suspend fun yieldBarReturnType(/*0*/ t: T): T
|
||||
}
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// SKIP_TXT
|
||||
class StateMachine<Q> internal constructor() {
|
||||
fun getInputStub(): Q = null <!UNCHECKED_CAST!>as Q<!>
|
||||
@@ -12,7 +13,7 @@ class Problem<F>(){
|
||||
|
||||
fun createStateMachine(): StateMachine<F> = stateMachine {
|
||||
val letter = getInputStub()
|
||||
if (letter is Any)
|
||||
if (<!NI;USELESS_IS_CHECK!>letter is Any<!>)
|
||||
println("yes")
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
class GenericController<T> {
|
||||
suspend fun yield(t: T) {}
|
||||
@@ -10,7 +12,7 @@ suspend fun <S> GenericController<List<S>>.yieldGenerate(g: suspend GenericContr
|
||||
|
||||
val test1 = generate {
|
||||
// TODO: KT-15185
|
||||
<!TYPE_MISMATCH, TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR!>yieldGenerate<!> {
|
||||
<!OI;TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR, OI;TYPE_MISMATCH!>yieldGenerate<!> {
|
||||
yield(4)
|
||||
}
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
package
|
||||
|
||||
public val test1: kotlin.collections.List<kotlin.collections.List<kotlin.Int>>
|
||||
public fun </*0*/ S> generate(/*0*/ g: suspend GenericController<S>.() -> kotlin.Unit): kotlin.collections.List<S>
|
||||
public suspend fun </*0*/ S> GenericController<kotlin.collections.List<S>>.yieldGenerate(/*0*/ g: suspend GenericController<S>.() -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
public final class GenericController</*0*/ T> {
|
||||
public constructor GenericController</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final suspend fun yield(/*0*/ t: T): kotlin.Unit
|
||||
}
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
class Controller<T> {
|
||||
suspend fun yield(t: T) {}
|
||||
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
package
|
||||
|
||||
public val test1: [ERROR : Error type for ParseError-argument VALUE_ARGUMENT]
|
||||
public val test2: kotlin.Int
|
||||
public fun </*0*/ S> generate(/*0*/ g: suspend Controller<S>.() -> kotlin.Unit): S
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Controller</*0*/ T> {
|
||||
public constructor Controller</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final suspend fun yield(/*0*/ t: T): kotlin.Unit
|
||||
}
|
||||
Vendored
+3
-1
@@ -1,6 +1,8 @@
|
||||
package
|
||||
|
||||
public val test1: [ERROR : Error type for ParseError-argument VALUE_ARGUMENT]
|
||||
public val test1: [ERROR : Type for generate {
|
||||
yield(A)
|
||||
}]
|
||||
public val test2: kotlin.Int
|
||||
public fun </*0*/ S> generate(/*0*/ g: suspend Controller<S>.() -> kotlin.Unit): S
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
class Controller<T : Number> {
|
||||
suspend fun yield(t: T) {}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
public val test: kotlin.String
|
||||
public fun </*0*/ S : kotlin.Number> generate(/*0*/ g: suspend Controller<S>.() -> kotlin.Unit): S
|
||||
|
||||
public final class Controller</*0*/ T : kotlin.Number> {
|
||||
public constructor Controller</*0*/ T : kotlin.Number>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final suspend fun yield(/*0*/ t: T): kotlin.Unit
|
||||
}
|
||||
Vendored
+3
-1
@@ -1,6 +1,8 @@
|
||||
package
|
||||
|
||||
public val test: kotlin.String
|
||||
public val test: [ERROR : Type for generate {
|
||||
yield("foo")
|
||||
}]
|
||||
public fun </*0*/ S : kotlin.Number> generate(/*0*/ g: suspend Controller<S>.() -> kotlin.Unit): S
|
||||
|
||||
public final class Controller</*0*/ T : kotlin.Number> {
|
||||
|
||||
Vendored
+3
-1
@@ -1,4 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
class GenericController<T> {
|
||||
suspend fun yield(t: T) {}
|
||||
@@ -6,7 +8,7 @@ class GenericController<T> {
|
||||
|
||||
fun <S> generate(g: suspend GenericController<S>.(S) -> Unit): S = TODO()
|
||||
|
||||
val test1 = <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
val test1 = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
yield(4)
|
||||
}
|
||||
|
||||
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
package
|
||||
|
||||
public val test1: kotlin.Int
|
||||
public val test2: kotlin.Int
|
||||
public val test3: kotlin.Int
|
||||
public fun </*0*/ S> generate(/*0*/ g: suspend GenericController<S>.(S) -> kotlin.Unit): S
|
||||
|
||||
public final class GenericController</*0*/ T> {
|
||||
public constructor GenericController</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final suspend fun yield(/*0*/ t: T): kotlin.Unit
|
||||
}
|
||||
Reference in New Issue
Block a user