Rename: auto cast -> smart cast
This commit is contained in:
@@ -12,15 +12,15 @@ trait D : A
|
||||
|
||||
fun test(a: A?) {
|
||||
if (a != null && a is B?) {
|
||||
<info descr="Automatically cast to B">a</info>.bar()
|
||||
<info descr="Smart cast to B">a</info>.bar()
|
||||
}
|
||||
|
||||
if (a is B && a is C) {
|
||||
<info descr="Automatically cast to B">a</info>.foo()
|
||||
<info descr="Smart cast to B">a</info>.foo()
|
||||
}
|
||||
|
||||
if (a is B? && a is C?) {
|
||||
<info descr="Automatically cast to B?">a</info><info>?.</info>bar()
|
||||
<info descr="Smart cast to B?">a</info><info>?.</info>bar()
|
||||
}
|
||||
|
||||
a<info>?.</info>foo()
|
||||
@@ -29,7 +29,7 @@ fun test(a: A?) {
|
||||
}
|
||||
|
||||
if (a is B && a is D) {
|
||||
//when it's resolved, the message should be 'Automatically cast to A'
|
||||
//when it's resolved, the message should be 'Smart cast to A'
|
||||
a.<error>foo</error>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user