[JVM IR] Do not add nullability annotation for functions that return

platform types.

This behavior matches the non-IR backend, which was added in
f16dcdd8a9.
This commit is contained in:
Mark Punzalan
2020-02-05 14:48:58 -08:00
committed by Dmitry Petrov
parent 0c984c5e62
commit 06b6477d04
4 changed files with 28 additions and 4 deletions
@@ -0,0 +1,8 @@
// WITH_RUNTIME
import java.util.Collections
class PlatformTypes {
fun simplyPlatform() = Collections.singletonList("")[0]
fun bothNullable() = Collections.emptyList<String>() ?: null
fun bothNotNull() = Collections.emptyList<String>()!!
}
@@ -0,0 +1,7 @@
@kotlin.Metadata
public final class PlatformTypes {
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method bothNotNull(): java.util.List
public final @org.jetbrains.annotations.Nullable method bothNullable(): java.util.List
public final method simplyPlatform(): java.lang.String
}