Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: test/rules/parameter_assignments.dart

Issue 2424743004: Fix exception in linter (issue 315) (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/rules/parameter_assignments.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « lib/src/rules/parameter_assignments.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698