[NI] Update testdata for stdlib diagnostic tests

This commit is contained in:
Dmitriy Novozhilov
2019-05-28 10:56:58 +03:00
parent 139497bafb
commit 0f7e91ff6d
21 changed files with 70 additions and 32 deletions
@@ -1,8 +1,25 @@
package
public val test1: ???
public val test2: ???
public val test3: ???
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 {
@@ -53,7 +53,7 @@ val test6 = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
}
val test7 = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
yield(<!NI;TYPE_MISMATCH!>"baz"<!>)
yield("baz")
genericExtension<Int>()
}
@@ -1,7 +1,9 @@
package
public val test1: kotlin.String
public val test2: kotlin.Any?
public val test2: [ERROR : Type for generate {
baseExtension()
}]
public val test3: kotlin.Int
public val test4: kotlin.Any?
public val test5: kotlin.Int
@@ -1,11 +1,15 @@
package
public val test1: kotlin.String
public val test2: kotlin.Any?
public val test2: [ERROR : Type for generate {
starBase()
}]
public val test3: kotlin.String
public val test4: kotlin.Int
public val test5: kotlin.Int
public val test6: kotlin.Any?
public val test6: [ERROR : Type for generateSpecific {
stringBase()
}]
public fun </*0*/ S> generate(/*0*/ @kotlin.BuilderInference g: suspend Controller<S>.() -> kotlin.Unit): S
public fun </*0*/ S> generateSpecific(/*0*/ @kotlin.BuilderInference g: suspend SpecificController<S>.() -> kotlin.Unit): S
public fun Base<*>.starBase(): kotlin.Unit
@@ -2,7 +2,9 @@ package
public val extension: kotlin.collections.List<kotlin.String>
public val member: kotlin.collections.List<kotlin.Int>
public val memberWithoutAnn: kotlin.collections.List<???>
public val memberWithoutAnn: [ERROR : Type for wrongBuild {
add(42)
}]
public val safeExtension: kotlin.collections.List<kotlin.String>
public fun </*0*/ S> build(/*0*/ g: suspend Builder<S>.() -> kotlin.Unit): kotlin.collections.List<S>
public fun </*0*/ S> wrongBuild(/*0*/ g: Builder<S>.() -> kotlin.Unit): kotlin.collections.List<S>
@@ -1,6 +1,11 @@
package
public val test1: kotlin.collections.List<kotlin.collections.List<???>>
public val test1: [ERROR : Type for generate {
// TODO: KT-15185
yieldGenerate {
yield(4)
}
}]
public fun </*0*/ S> generate(/*0*/ @kotlin.BuilderInference g: suspend GenericController<S>.() -> kotlin.Unit): kotlin.collections.List<S>
@kotlin.BuilderInference public suspend fun </*0*/ S> GenericController<kotlin.collections.List<S>>.yieldGenerate(/*0*/ g: suspend GenericController<S>.() -> kotlin.Unit): kotlin.Unit
@@ -2,7 +2,9 @@ package
public val extension: kotlin.collections.List<kotlin.String>
public val member: kotlin.collections.List<kotlin.Int>
public val memberWithoutAnn: kotlin.collections.List<???>
public val memberWithoutAnn: [ERROR : Type for wrongBuild {
add(42)
}]
public val safeExtension: kotlin.collections.List<kotlin.String>
public fun </*0*/ S> build(/*0*/ @kotlin.BuilderInference g: Builder<S>.() -> kotlin.Unit): kotlin.collections.List<S>
public fun </*0*/ S> wrongBuild(/*0*/ g: Builder<S>.() -> kotlin.Unit): kotlin.collections.List<S>
@@ -1,6 +1,8 @@
package
public val test1: kotlin.Any?
public val test1: [ERROR : Type for generate {
yield(A)
}]
public val test2: kotlin.Int
public fun </*0*/ S> generate(/*0*/ @kotlin.BuilderInference g: suspend Controller<S>.() -> kotlin.Unit): S
@@ -1,6 +1,8 @@
package
public val test: ???
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> {
@@ -1,6 +1,8 @@
package
public val test1: ???
public val test1: [ERROR : Type for generate {
yield(4)
}]
public val test2: kotlin.Int
public val test3: kotlin.Int
public fun </*0*/ S> generate(/*0*/ g: suspend GenericController<S>.(S) -> kotlin.Unit): S
@@ -28,7 +28,7 @@ fun foo() {
i = genericBuilder { 1 }
genericBuilder { 1 }
genericBuilder<Int> { 1 }
genericBuilder<Int> { <!NI;TYPE_MISMATCH, TYPE_MISMATCH!>""<!> }
genericBuilder<Int> { <!TYPE_MISMATCH!>""<!> }
val y = { 1 }
<!OI;TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR!>genericBuilder<!>(<!TYPE_MISMATCH!>y<!>)
@@ -43,7 +43,7 @@ fun foo() {
val s: String = manyArgumentsBuilder({}, { "" }) { 1 }
manyArgumentsBuilder<String>({}, { "" }, { 1 })
manyArgumentsBuilder<String>({}, { <!CONSTANT_EXPECTED_TYPE_MISMATCH, NI;CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!> }, { 2 })
manyArgumentsBuilder<String>({}, { <!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!> }, { 2 })
severalParamsInLambda { <!NAME_SHADOWING!>x<!>, <!NAME_SHADOWING!>y<!> ->
x checkType { _<String>() }
@@ -8,7 +8,7 @@ fun <T> genericBuilder(c: suspend () -> T): T = null!!
fun foo() {
var result = ""
genericBuilder<String> {
<!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>try {
<!NI;TYPE_MISMATCH!>try {
await("")
} catch(e: Exception) {
<!OI;EXPECTED_TYPE_MISMATCH!>result = "fail"<!>