Open traceyyoshima opened 9 months ago
Note: This may be simpler using the IR. There isn't a PSI element associated with the FIR elements label field since the PSI on the label is the labeled element.
fun foo(ints: List<Int>) {
ints.forEach {
if (it == 0) return@forEach // The PSI element on the FIR's label to `forEach` is the `forEach` a select of `ints`.
print(it)
}
}
Discovered by type assertions. The PSI element association includes various FIR elements, including a reference to the anonymous function. Note: this mis-mapping applies to all labels that may be type-attributed.