Use proper applicability for constraint warnings
^KT-47316 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
1224d28deb
commit
c3a5a7754d
@@ -1,5 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
sealed class Subtype<A1, B1> {
|
||||
abstract fun cast(value: A1): B1
|
||||
class Trivial<A2 : B2, B2> : Subtype<A2, B2>() {
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
// FILE: GoBuildingRunningState.java
|
||||
public abstract class GoBuildingRunningState<T extends GoBuildingRunConfiguration<? extends GoBuildingRunningState<T>>> implements RunProfileState {
|
||||
public String getBuildingWorkingDirectory() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: GoBuildingRunConfiguration.java
|
||||
public abstract class GoBuildingRunConfiguration<RunningState extends GoBuildingRunningState<? extends GoBuildingRunConfiguration<RunningState>>> { }
|
||||
|
||||
// FILE: RunProfileState.java
|
||||
public interface RunProfileState {
|
||||
}
|
||||
|
||||
// FILE: Test.java
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class Test {
|
||||
@Nullable
|
||||
public RunProfileState getState() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun String.asFsdAddress(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val state = Test().state
|
||||
if (state is GoBuildingRunningState<*>) {
|
||||
state.buildingWorkingDirectory.asFsdAddress()
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -CAST_NEVER_SUCCEEDS
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun <E : Enum<E>> createMap(enumClass: Class<E>) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user