Minor. Roll back behaviour for FlexibleType.isError.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
// FILE: Collections.java
|
||||
import java.util.List
|
||||
|
||||
public class Collections {
|
||||
public static final <T> List<T> emptyList() {
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
fun bar(): List<String> = null!!
|
||||
|
||||
fun test() {
|
||||
val f = if (true) {
|
||||
Collections.emptyList()
|
||||
}
|
||||
else {
|
||||
bar()
|
||||
}
|
||||
|
||||
checkSubtype<List<String>>(f)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package
|
||||
|
||||
public fun bar(): kotlin.collections.List<kotlin.String>
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public open class Collections {
|
||||
public constructor Collections()
|
||||
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
|
||||
|
||||
// Static members
|
||||
public final fun </*0*/ T : kotlin.Any!> emptyList(): kotlin.collections.(Mutable)List<T!>!
|
||||
}
|
||||
@@ -12903,6 +12903,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("javaEmptyList.kt")
|
||||
public void testJavaEmptyList() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/javaEmptyList.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodTypeParameterDefaultBound.kt")
|
||||
public void testMethodTypeParameterDefaultBound() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.kt");
|
||||
|
||||
@@ -156,7 +156,7 @@ abstract class FlexibleType(val lowerBound: SimpleType, val upperBound: SimpleTy
|
||||
override val arguments: List<TypeProjection> get() = delegate.arguments
|
||||
override val isMarkedNullable: Boolean get() = delegate.isMarkedNullable
|
||||
override val memberScope: MemberScope get() = delegate.memberScope
|
||||
override val isError: Boolean get() = false
|
||||
override val isError: Boolean get() = delegate.isError // todo should be false?
|
||||
|
||||
override fun toString(): String = DescriptorRenderer.DEBUG_TEXT.renderType(this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user