"Let type implement interface": don't suggest same type #KT-25928 Fixed

This commit is contained in:
Toshiaki Kameyama
2018-08-10 05:40:00 +03:00
committed by Mikhail Glukhikh
parent 2d2f1125a9
commit 6fbf6b0a93
3 changed files with 18 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
// "Let 'Foo?' extend interface 'Foo'" "false"
// ACTION: Add non-null asserted (!!) call
// ACTION: Change type of 'x' to 'Foo?'
// ERROR: Type mismatch: inferred type is Foo? but Foo was expected
interface Foo
fun test(foo: Foo?) {
val x: Foo = foo<caret>
}