Review fixes for mutable variable smart casting (mostly refactoring).

DataFlowValue.isPredictable() introduced instead of isStableIdentifier().
Parenthesized assignments are treated correctly.
This commit is contained in:
Mikhail Glukhikh
2015-04-16 20:05:46 +03:00
parent e97e792674
commit 109e0abb6d
17 changed files with 133 additions and 81 deletions
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.descriptors.PackageViewDescriptor
fun renderDataFlowValue(value: DataFlowValue): String? {
// If it is not a stable identifier, there's no point in rendering it
if (!value.isStableIdentifier() && !value.isLocalVariable()) return null
if (!value.isPredictable()) return null
fun renderId(id: Any?): String? {
return when (id) {