Do not allow to assign null to a non-null property via reflection
This was already working for accessor-based properties because the assertions were already generated into corresponding accessors, but for fields we must manually check the value against null
This commit is contained in:
+6
@@ -2844,6 +2844,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("disallowNullValueForNotNullField.kt")
|
||||
public void testDisallowNullValueForNotNullField() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/call/disallowNullValueForNotNullField.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("equalsHashCodeToString.kt")
|
||||
public void testEqualsHashCodeToString() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/call/equalsHashCodeToString.kt");
|
||||
|
||||
Reference in New Issue
Block a user