[FE 1.0] Fix some diagnostic tests
This commit is contained in:
committed by
Mikhael Bogdanov
parent
7250aed3b5
commit
95492f7370
Vendored
+2
-8
@@ -2,14 +2,8 @@ package
|
||||
|
||||
public val test1: kotlin.collections.List<kotlin.Int>
|
||||
public val test2: kotlin.collections.List<kotlin.Int>
|
||||
public val test3: [ERROR : Type for generate {
|
||||
yield(3)
|
||||
yieldBarReturnType(3)
|
||||
}]
|
||||
public val test4: [ERROR : Type for generate {
|
||||
yield(3)
|
||||
barReturnType()
|
||||
}]
|
||||
public val test3: kotlin.collections.List<kotlin.Int>
|
||||
public val test4: kotlin.collections.List<kotlin.Int>
|
||||
public fun </*0*/ S> generate(/*0*/ @kotlin.BuilderInference g: suspend GenericController<S>.() -> kotlin.Unit): kotlin.collections.List<S>
|
||||
|
||||
public final class GenericController</*0*/ T> {
|
||||
|
||||
+1
-3
@@ -1,8 +1,6 @@
|
||||
package
|
||||
|
||||
public val extension: [ERROR : Type for generate {
|
||||
extensionYield("foo")
|
||||
}]
|
||||
public val extension: kotlin.collections.List<kotlin.String>
|
||||
public val normal: kotlin.collections.List<kotlin.Int>
|
||||
public val safeExtension: kotlin.collections.List<kotlin.String>
|
||||
public fun </*0*/ S> generate(/*0*/ @kotlin.BuilderInference g: suspend GenericController<S>.() -> kotlin.Unit): kotlin.collections.List<S>
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ fun test_2() {
|
||||
fun test_3() {
|
||||
sequence {
|
||||
yield(materialize<Int>())
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
|
||||
<!TYPE_MISMATCH, TYPE_MISMATCH!>materialize()<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-41308
|
||||
// ISSUE: KT-41308, KT-47830
|
||||
|
||||
fun main() {
|
||||
sequence {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>sequence<!> {
|
||||
val list: List<String>? = null
|
||||
val outputList = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<kotlin.String>")!>list ?: listOf()<!>
|
||||
yieldAll(outputList)
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, NONE_APPLICABLE!>yieldAll<!>(outputList)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// ISSUE: KT-41430
|
||||
// ISSUE: KT-41430, KT-47830
|
||||
|
||||
class A
|
||||
|
||||
@@ -14,7 +14,7 @@ fun test_2(list: List<Set<A>>) {
|
||||
|
||||
fun test_3(list: List<Set<A>>) {
|
||||
sequence {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableSet<A>")!>list.flatMapTo(mutableSetOf()) { it }<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Type is unknown")!>list.flatMapTo(mutableSetOf()) { it }<!>
|
||||
yield(A())
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,6 @@ fun test_3(list: List<Set<A>>) {
|
||||
fun test_4(list: List<Set<A>>) {
|
||||
sequence {
|
||||
yield(A())
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableSet<A>")!>list.flatMapTo(mutableSetOf()) { it }<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableSet<A>"), TYPE_MISMATCH, TYPE_MISMATCH!>list.flatMapTo(mutableSetOf()) { it }<!>
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !LANGUAGE: -TypeEnhancementImprovementsInStrictMode
|
||||
|
||||
// FILE: SmartFMap.java
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
// !LANGUAGE: -TypeEnhancementImprovementsInStrictMode
|
||||
// FULL_JDK
|
||||
|
||||
// FILE: MapLike.java
|
||||
|
||||
Reference in New Issue
Block a user