Minor: add / fix comments (related to KT-20752)
This commit is contained in:
+2
@@ -97,6 +97,8 @@ internal class DelegatingDataFlowInfo private constructor(
|
|||||||
languageVersionSettings: LanguageVersionSettings,
|
languageVersionSettings: LanguageVersionSettings,
|
||||||
typeInfo: SetMultimap<DataFlowValue, KotlinType>? = null,
|
typeInfo: SetMultimap<DataFlowValue, KotlinType>? = null,
|
||||||
affectReceiver: Boolean = true,
|
affectReceiver: Boolean = true,
|
||||||
|
// TODO: remove me in version 1.3! I'm very dirty hack!
|
||||||
|
// In normal circumstances this should be always true
|
||||||
recordUnstable: Boolean = true
|
recordUnstable: Boolean = true
|
||||||
): Boolean {
|
): Boolean {
|
||||||
if (value.isStable || recordUnstable) {
|
if (value.isStable || recordUnstable) {
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ fun StringList.remove(s: String?) = s ?: ""
|
|||||||
fun foo(list: StringList, arg: Unstable) {
|
fun foo(list: StringList, arg: Unstable) {
|
||||||
list.remove(arg.first)
|
list.remove(arg.first)
|
||||||
if (arg.first <!USELESS_CAST!>as? String<!> != null) {
|
if (arg.first <!USELESS_CAST!>as? String<!> != null) {
|
||||||
// Ideally should have smart cast impossible here
|
// Should be still resolved to extension, without smart cast or smart cast impossible
|
||||||
list.remove(arg.first)
|
list.remove(arg.first)
|
||||||
}
|
}
|
||||||
val s = arg.first <!USELESS_CAST!>as? String<!>
|
val s = arg.first <!USELESS_CAST!>as? String<!>
|
||||||
if (s != null) {
|
if (s != null) {
|
||||||
// Ideally should have smart cast impossible here
|
// Should be still resolved to extension, without smart cast or smart cast impossible
|
||||||
list.remove(arg.first)
|
list.remove(arg.first)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ fun String.isEmpty() = this == ""
|
|||||||
fun foo(list: StringList, arg: Unstable) {
|
fun foo(list: StringList, arg: Unstable) {
|
||||||
list.remove(arg.first)
|
list.remove(arg.first)
|
||||||
if (arg.first?.isEmpty() ?: false) {
|
if (arg.first?.isEmpty() ?: false) {
|
||||||
// Ideally should have smart cast impossible here
|
// Should be still resolved to extension, without smart cast or smart cast impossible
|
||||||
list.remove(<!SMARTCAST_IMPOSSIBLE!>arg.first<!>)
|
list.remove(<!SMARTCAST_IMPOSSIBLE!>arg.first<!>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,7 @@ fun BooleanList.remove(b: Boolean?) = b ?: false
|
|||||||
fun bar(list: BooleanList, arg: UnstableBoolean) {
|
fun bar(list: BooleanList, arg: UnstableBoolean) {
|
||||||
list.remove(arg.first)
|
list.remove(arg.first)
|
||||||
if (arg.first ?: false) {
|
if (arg.first ?: false) {
|
||||||
// Ideally should have smart cast impossible here
|
// Should be still resolved to extension, without smart cast or smart cast impossible
|
||||||
list.remove(<!SMARTCAST_IMPOSSIBLE!>arg.first<!>)
|
list.remove(<!SMARTCAST_IMPOSSIBLE!>arg.first<!>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user