KT-987 Unboxing nulls
#KT-987 Fixed
This commit is contained in:
@@ -61,7 +61,7 @@ class Luhny() {
|
||||
|
||||
private fun printOneDigit() {
|
||||
while (!buffer.isEmpty()) {
|
||||
val c = buffer.removeFirst()
|
||||
val c = buffer.removeFirst().sure()
|
||||
print(c)
|
||||
if (c.isDigit()) {
|
||||
digits.removeFirst()
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// FILE: a/Test.java
|
||||
package a;
|
||||
|
||||
public class Test<T> {
|
||||
T t() {return null;}
|
||||
}
|
||||
// FILE: b.kt
|
||||
package a
|
||||
|
||||
fun foo() {
|
||||
// If this fails, it means that we have broken the rule that Java returns are always nullable
|
||||
a.Test<Int>.t() <!UNSAFE_INFIX_CALL!>+<!> 1
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
final class MethosWithPRefTP() {
|
||||
fun <erased P> f(p0: P) = #()
|
||||
fun <erased P> f(p0: P?) = #()
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
final class test.MethosWithPRefTP : jet.Any {
|
||||
final /*constructor*/ fun <init>(): test.MethosWithPRefTP
|
||||
final fun </*0*/ P : jet.Any?>f(/*0*/ p0: P): jet.Tuple0
|
||||
final fun </*0*/ P : jet.Any?>f(/*0*/ p0: P?): jet.Tuple0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user