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

Unified Diff: test/rules/always_declare_return_types.dart

Issue 1414793007: Lint to check for declared return types (#146). (Closed) Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: Created 5 years, 1 month 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 | « test/_data/p5/p5.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/rules/always_declare_return_types.dart
diff --git a/test/rules/always_declare_return_types.dart b/test/rules/always_declare_return_types.dart
new file mode 100644
index 0000000000000000000000000000000000000000..d58c77f0aceee1164e76984f6891715b4ac99a50
--- /dev/null
+++ b/test/rules/always_declare_return_types.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2015, 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.
+
+main() { } //LINT
+
+bar() => new _Foo(); //LINT
+
+class _Foo {
+ _foo() => 42; //LINT
+}
+
+typedef bad(int x); //LINT
+
+typedef bool predicate(Object o);
+
+void main2() { }
+
+_Foo bar2() => new _Foo();
+
+class _Foo2 {
+ int _foo() => 42;
+}
« no previous file with comments | « test/_data/p5/p5.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698