Fix incorrect UNINITIALIZED_ENUM_COMPANION diagnostic

#KT-20959 Fixed
This commit is contained in:
Denis Zharkov
2017-10-26 10:57:37 +03:00
parent b3b08514c5
commit 2df4d9496a
5 changed files with 52 additions and 1 deletions
@@ -190,7 +190,10 @@ class PseudocodeVariablesData(val pseudocode: Pseudocode, private val bindingCon
}
private fun WriteValueInstruction.isTrivialInitializer() =
element is KtVariableDeclaration || element is KtParameter
// WriteValueInstruction having KtDeclaration as an element means
// it must be a write happened at the same time when
// the variable (common variable/parameter/object) has been declared
element is KtDeclaration
private inner class ReadOnlyInitControlFlowInfoImpl(
val declaredSet: ImmutableSet<VariableDescriptor>,