[AA] treat named arguments as write access

^KTIJ-16835 fixed
This commit is contained in:
Anna Kozlova
2024-03-05 23:26:14 +01:00
committed by Space Team
parent 1222ef7fac
commit 943d829fa7
21 changed files with 513 additions and 3 deletions
@@ -0,0 +1,5 @@
class A(var property: Int)
fun foo(a: A) {
a.pro<caret>perty = 10
}
@@ -0,0 +1,2 @@
expression: property
access type: WRITE
@@ -0,0 +1,5 @@
class A(var property: Int)
fun foo(a: A) {
a.pro<caret>perty += 10
}
@@ -0,0 +1,2 @@
expression: property
access type: READ_WRITE
@@ -0,0 +1,6 @@
class A(val property: Int)
fun foo() {
val a = A(pr<caret>operty = 10)
println(a.property)
}
@@ -0,0 +1,2 @@
expression: property
access type: WRITE
@@ -0,0 +1,6 @@
class A(val property: Int)
fun foo() {
val a = A(property = 10)
println(a.pr<caret>operty)
}
@@ -0,0 +1,2 @@
expression: property
access type: READ
@@ -0,0 +1,6 @@
class A(val property: Int)
fun foo() {
val a = A(property = 10)
println((a.pr<caret>operty))
}
@@ -0,0 +1,2 @@
expression: property
access type: READ
@@ -0,0 +1,5 @@
class A(var property: Int)
fun foo(a: A) {
a.pro<caret>perty++
}
@@ -0,0 +1,2 @@
expression: property
access type: READ_WRITE