[FIR] Fix raw type nullability computation
Consider the nullability of the type arguments, not of the type. This fixes a false positive ARGUMENT_TYPE_MISMATCH. #KT-66294 Fixed
This commit is contained in:
committed by
Space Team
parent
df878918ee
commit
172df04c9b
+31
@@ -0,0 +1,31 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: J.java
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class Editor<BC extends BuildConfiguration, TARGET extends BuildTarget<BC>> {
|
||||
public void onTargetSelected(@Nullable TARGET target) {}
|
||||
}
|
||||
|
||||
interface BuildConfiguration {}
|
||||
interface BuildTarget<BC extends BuildConfiguration> {}
|
||||
|
||||
class Helper extends AbstractHelper {}
|
||||
|
||||
abstract class AbstractHelper<BC extends BuildConfiguration, TARGET extends BuildTarget<BC>> {
|
||||
@Nullable
|
||||
public TARGET findRunTarget() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
package test
|
||||
|
||||
private fun test(
|
||||
editor: Editor<BuildConfiguration, BuildTarget<BuildConfiguration>>,
|
||||
helper: Helper,
|
||||
) {
|
||||
editor.onTargetSelected(helper.findRunTarget())
|
||||
}
|
||||
Reference in New Issue
Block a user