| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // test w/ `pub run test -N parameter_assignments` | 5 // test w/ `pub run test -N parameter_assignments` |
| 6 | 6 |
| 7 void badFunction(int parameter) { // LINT | 7 void badFunction(int parameter) { // LINT |
| 8 parameter = 4; | 8 parameter = 4; |
| 9 } | 9 } |
| 10 | 10 |
| 11 void ok(String parameter) { | 11 void ok(String parameter) { |
| 12 print(parameter); | 12 print(parameter); |
| 13 } | 13 } |
| 14 | 14 |
| 15 String get topLevelGetter => ''; |
| 16 |
| 15 class A { | 17 class A { |
| 16 int get x => 0; | 18 int get x => 0; |
| 17 | 19 |
| 18 set x(int value) { // LINT | 20 set x(int value) { // LINT |
| 19 value = 5; | 21 value = 5; |
| 20 } | 22 } |
| 21 | 23 |
| 22 void badFunction(int parameter) { // LINT | 24 void badFunction(int parameter) { // LINT |
| 23 parameter = 4; | 25 parameter = 4; |
| 24 } | 26 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 36 } | 38 } |
| 37 | 39 |
| 38 void otherBad(int parameter) { // LINT | 40 void otherBad(int parameter) { // LINT |
| 39 print(parameter++); | 41 print(parameter++); |
| 40 } | 42 } |
| 41 | 43 |
| 42 void otherBad1(int parameter) { // LINT | 44 void otherBad1(int parameter) { // LINT |
| 43 parameter += 3; | 45 parameter += 3; |
| 44 print(parameter); | 46 print(parameter); |
| 45 } | 47 } |
| OLD | NEW |