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

Unified Diff: test/rules/avoid_return_types_on_setters.dart

Issue 1636873007: Check for return types on setters (#122). (Closed) Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/rules/avoid_return_types_on_setters.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/rules/avoid_return_types_on_setters.dart
diff --git a/test/rules/avoid_return_types_on_setters.dart b/test/rules/avoid_return_types_on_setters.dart
new file mode 100644
index 0000000000000000000000000000000000000000..d72aa472fba666447a195990b7e7d407c397397d
--- /dev/null
+++ b/test/rules/avoid_return_types_on_setters.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// test w/ `dart test/util/solo_test.dart avoid_return_types_on_setters`
+
+set speed(int ms) {} //OK
+void set speed2(int ms) {} //LINT
+
+class Car {
+ static set make(String name) {} // OK
+ static void set model(String name) {} //LINT
+
+ set speed(int ms) {} //OK
+ void set speed2(int ms) {} //LINT
+}
« no previous file with comments | « lib/src/rules/avoid_return_types_on_setters.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698