Amend test data after adding Convert assignment to assignment expression intention

Relates to #KT-22420
This commit is contained in:
Vladimir Dolzhenko
2020-09-03 17:59:19 +02:00
parent 16ab11289c
commit d4ef85f6c2
12 changed files with 12 additions and 0 deletions
@@ -1,4 +1,5 @@
// "Assign to property" "false"
// ACTION: Convert assignment to assignment expression
// ERROR: Val cannot be reassigned
class Test {
var bar = 1
@@ -1,4 +1,5 @@
// "Assign to property" "false"
// ACTION: Convert assignment to assignment expression
// ERROR: Val cannot be reassigned
class Test(var bar: Int) {
fun test(foo: Int) {
@@ -1,4 +1,5 @@
// "Assign to property" "false"
// ACTION: Convert assignment to assignment expression
// ERROR: Val cannot be reassigned
class Test {
var foo = "1"
@@ -1,4 +1,5 @@
// "Assign to property" "false"
// ACTION: Convert assignment to assignment expression
// ERROR: Val cannot be reassigned
class Test(var foo: String) {
fun test(foo: Int) {
+1
View File
@@ -1,4 +1,5 @@
// "Assign to property" "false"
// ACTION: Convert assignment to assignment expression
// ERROR: Val cannot be reassigned
class Test(foo: Int) {
fun test(foo: Int) {
@@ -1,4 +1,5 @@
// "Assign to property" "false"
// ACTION: Convert assignment to assignment expression
// ERROR: Val cannot be reassigned
class Test {
val foo = 1
@@ -1,4 +1,5 @@
// "Assign to property" "false"
// ACTION: Convert assignment to assignment expression
// ERROR: Val cannot be reassigned
class Test(val foo: Int) {
fun test(foo: Int) {
@@ -1,5 +1,6 @@
// "Change type to MutableSet" "false"
// DISABLE-ERRORS
// ACTION: Convert assignment to assignment expression
// ACTION: Replace overloaded operator with function call
// WITH_RUNTIME
fun main() {
@@ -1,4 +1,5 @@
// "Create function 'synchronized'" "false"
// ACTION: Convert assignment to assignment expression
// ACTION: Convert expression to 'Int'
// ACTION: Round using roundToInt()
// ERROR: Type mismatch: inferred type is Float but Int was expected
@@ -2,6 +2,7 @@
// ACTION: Create local variable 'foo'
// ACTION: Create property 'foo'
// ACTION: Rename reference
// ACTION: Convert assignment to assignment expression
// ERROR: Unresolved reference: foo
fun test(n: Int) {
@@ -1,4 +1,5 @@
// "Remove redundant assignment" "false"
// ACTION: Convert assignment to assignment expression
fun foo(): Int {
var i = 1
<caret>i = 2
@@ -1,4 +1,5 @@
// "Change to var" "false"
// ACTION: Convert assignment to assignment expression
// ACTION: Remove redundant assignment
// ERROR: Val cannot be reassigned
fun fun1(i: Int) {