PSI Pattern Matching: Fix matching of !!

#KT-6021 Fixed
This commit is contained in:
Alexey Sedunov
2014-10-15 14:08:45 +04:00
parent 6f5a2172ac
commit b18b888161
6 changed files with 59 additions and 0 deletions
@@ -0,0 +1,12 @@
// PARAM_TYPES: kotlin.String?, kotlin.Comparable<String>?, kotlin.CharSequence?, kotlin.Any?
// PARAM_DESCRIPTOR: val s: kotlin.String? defined in foo
// SIBLING:
fun foo(): Int {
val s: String? = ""
return if (true) {
<selection>s!!.length</selection>
} else {
s!!.length
}
}
@@ -0,0 +1,16 @@
// PARAM_TYPES: kotlin.String?, kotlin.Comparable<String>?, kotlin.CharSequence?, kotlin.Any?
// PARAM_DESCRIPTOR: val s: kotlin.String? defined in foo
// SIBLING:
fun foo(): Int {
val s: String? = ""
return if (true) {
i(s)
} else {
i(s)
}
}
private fun i(s: String?): Int {
return s!!.length
}