Revert "Make freshly substituted type variables def not nullable if they come from not null type parameter"

This reverts commit 41936a790b37bef45d7e7dad851856ea1750ef01.
This commit is contained in:
Victor Petukhov
2021-10-19 13:12:54 +03:00
parent 2261928f4f
commit e0a4704c21
12 changed files with 14 additions and 80 deletions
@@ -3,7 +3,7 @@ import java.util.*
fun use() {
val x: String? = "x"
Optional.of(x)
// SUCCESS
// UNSAFE_CALL_ERROR
// ORIGINAL: fun <T : Any!> of(T): Optional<T> defined in java.util.Optional
// SUBSTITUTED: fun <T : Any!> of(String): Optional<String> defined in java.util.Optional