Minor: change a test to be more precise
This commit is contained in:
+5
-5
@@ -1,16 +1,16 @@
|
||||
class Box(var item: String?)
|
||||
|
||||
fun <T> take(it: T) {}
|
||||
fun expectString(it: String) {}
|
||||
|
||||
fun Box.test() {
|
||||
val other = Box("")
|
||||
myRun {
|
||||
if (item != null) {
|
||||
take<String>(<!SMARTCAST_IMPOSSIBLE!>item<!>)
|
||||
expectString(<!SMARTCAST_IMPOSSIBLE!>item<!>)
|
||||
other.item = null
|
||||
take<String>(<!SMARTCAST_IMPOSSIBLE!>item<!>)
|
||||
expectString(<!SMARTCAST_IMPOSSIBLE!>item<!>)
|
||||
this.item = null
|
||||
take<String>(<!ARGUMENT_TYPE_MISMATCH!>item<!>)
|
||||
expectString(<!ARGUMENT_TYPE_MISMATCH!>item<!>)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ fun Box.test() {
|
||||
myRun {
|
||||
if (item != null) {
|
||||
this.item = null
|
||||
take<String>(item)
|
||||
expectString(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
class Box(var item: String?)
|
||||
|
||||
fun <T> take(it: T) {}
|
||||
fun expectString(it: String) {}
|
||||
|
||||
fun Box.test() {
|
||||
val other = Box("")
|
||||
myRun {
|
||||
if (item != null) {
|
||||
take<String>(<!SMARTCAST_IMPOSSIBLE!>item<!>)
|
||||
expectString(<!SMARTCAST_IMPOSSIBLE!>item<!>)
|
||||
other.item = null
|
||||
take<String>(<!SMARTCAST_IMPOSSIBLE!>item<!>)
|
||||
expectString(<!SMARTCAST_IMPOSSIBLE!>item<!>)
|
||||
this.item = null
|
||||
take<String>(<!TYPE_MISMATCH!>item<!>)
|
||||
expectString(<!TYPE_MISMATCH!>item<!>)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ fun Box.test() {
|
||||
myRun {
|
||||
if (item != null) {
|
||||
this.item = null
|
||||
take<String>(<!DEBUG_INFO_SMARTCAST!>item<!>)
|
||||
expectString(<!DEBUG_INFO_SMARTCAST!>item<!>)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package
|
||||
|
||||
public fun expectString(/*0*/ it: kotlin.String): kotlin.Unit
|
||||
public fun myRun(/*0*/ block: () -> kotlin.Unit): kotlin.Unit
|
||||
public fun </*0*/ T> take(/*0*/ it: T): kotlin.Unit
|
||||
public fun Box.test(): kotlin.Unit
|
||||
|
||||
public final class Box {
|
||||
|
||||
Reference in New Issue
Block a user