[K/JS] Save nullability from the original type of value parameters ^KT-63013 Fixed
This commit is contained in:
+6
@@ -5896,6 +5896,12 @@ public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest {
|
||||
runTest("js/js.translator/testData/box/inline/recursiveDependency.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("requireNotNull.kt")
|
||||
public void testRequireNotNull() throws Exception {
|
||||
runTest("js/js.translator/testData/box/inline/requireNotNull.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("rootConstructor.kt")
|
||||
public void testRootConstructor() throws Exception {
|
||||
|
||||
+6
@@ -6002,6 +6002,12 @@ public class FirJsES6BoxTestGenerated extends AbstractFirJsES6BoxTest {
|
||||
runTest("js/js.translator/testData/box/inline/recursiveDependency.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("requireNotNull.kt")
|
||||
public void testRequireNotNull() throws Exception {
|
||||
runTest("js/js.translator/testData/box/inline/requireNotNull.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("rootConstructor.kt")
|
||||
public void testRootConstructor() throws Exception {
|
||||
|
||||
+6
@@ -6002,6 +6002,12 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test {
|
||||
runTest("js/js.translator/testData/box/inline/recursiveDependency.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("requireNotNull.kt")
|
||||
public void testRequireNotNull() throws Exception {
|
||||
runTest("js/js.translator/testData/box/inline/requireNotNull.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("rootConstructor.kt")
|
||||
public void testRootConstructor() throws Exception {
|
||||
|
||||
+6
@@ -5896,6 +5896,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/inline/recursiveDependency.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("requireNotNull.kt")
|
||||
public void testRequireNotNull() throws Exception {
|
||||
runTest("js/js.translator/testData/box/inline/requireNotNull.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("rootConstructor.kt")
|
||||
public void testRootConstructor() throws Exception {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// WITH_STDLIB
|
||||
// EXPECTED_REACHABLE_NODES: 1283
|
||||
package foo
|
||||
|
||||
fun box(): String {
|
||||
val foo: Char? = 'c'
|
||||
requireNotNull(foo) { "Fail 1" }
|
||||
val bar: Char? = null
|
||||
requireNotNull(bar) { return "OK" }
|
||||
return "Fail 2"
|
||||
}
|
||||
Reference in New Issue
Block a user