Get rid of redundant not-null assertion for parameter
The problem was that in `Function<T>.apply(T)` T is now not-platform, so when checking if not-null assertion is needed for parameter in SAM, it's defined by the upper bounds of T that is a platform (Any..Any?), and while it's definitely not marked as nullable it's still nullable in a sense that it can contain null as a value. So the solution is obvious #KT-16413 Fixed
This commit is contained in:
+6
@@ -84,6 +84,12 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("functionAssertion.kt")
|
||||
public void testFunctionAssertion() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/functionAssertion.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inheritKotlin.kt")
|
||||
public void testInheritKotlin() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/inheritKotlin.kt");
|
||||
|
||||
Reference in New Issue
Block a user