[FIR] Use Operator origin for ITERATOR and HAS_NEXT function calls instead of Regular

It automatically fixes KT-62356 since iterators now are operators

^KT-62356 Fixed
This commit is contained in:
Ivan Kochurkin
2024-02-18 19:15:14 +01:00
committed by Space Team
parent 313b230333
commit 55159694df
7 changed files with 40 additions and 22 deletions
@@ -187,13 +187,13 @@ class B(var a: Int = 0) {
* TESTCASE NUMBER: 7
* NOTE: for-loop operators
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-36898
* ISSUES: KT-36898, KT-62356
*/
package testPackCase7
fun case7 () {
val iterable: Iterable = Iterable(Inv('s'))
for (i in iterable) {
for (i in <!PROPERTY_AS_OPERATOR!>iterable<!>) {
println(i)
}
}
@@ -220,13 +220,13 @@ class Inv(val c: Char) {
* TESTCASE NUMBER: 8
* NOTE: for-loop operators
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-36898
* ISSUES: KT-36898, KT-62356
*/
package testPackCase8
fun case8 () {
val iterable: Iterable = Iterable()
for (i in iterable) {
for (i in <!PROPERTY_AS_OPERATOR!>iterable<!>) {
println(i)
}
}
@@ -187,7 +187,7 @@ class B(var a: Int = 0) {
* TESTCASE NUMBER: 7
* NOTE: for-loop operators
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-36898
* ISSUES: KT-36898, KT-62356
*/
package testPackCase7
@@ -220,7 +220,7 @@ class Inv(val c: Char) {
* TESTCASE NUMBER: 8
* NOTE: for-loop operators
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-36898
* ISSUES: KT-36898, KT-62356
*/
package testPackCase8