The type on _ and adapter will be destruct instead of the defined variables. This likely only requires a slight revision to the parser visitor to call type on the correct elements. The issue occurs in visitDestructuringDeclarationEntry through createIdentifier and the PsiElementAssociation#primary method. IntelliJ assigns the correct types as String, so the information must be available but might occur in the IR instead of the FIR.
fun foo(choices: List<Pair<String, String>>, peekedHeader: Regex) {
for ((_, adapter) in choices) {
if (adapter.matches(peekedHeader)) {
print("1")
}
}
}
The type on
_
andadapter
will bedestruct
instead of the defined variables.This likely only requires a slight revision to the parser visitor to call type on the correct elements.The issue occurs invisitDestructuringDeclarationEntry
through createIdentifier and the PsiElementAssociation#primary method. IntelliJ assigns the correct types as String, so the information must be available but might occur in the IR instead of the FIR.