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

Unified Diff: tests/language/getter_parameters_test.dart

Issue 21013004: Remove support for getters with parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
Index: tests/language/getter_parameters_test.dart
diff --git a/tests/language/getter_parameters_test.dart b/tests/language/getter_parameters_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..a8381150fc193baf99cd7ebf06cdbbdbb1839b34
--- /dev/null
+++ b/tests/language/getter_parameters_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2013, 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 that a getter has no parameters.
+
+get f1 => null;
+get f2() => null; /// 01: compile-time error
ahe 2013/08/06 14:25:06 Should be: get f2 () /// 01: compile-time error =
Johnni Winther 2013/08/07 06:35:17 Done.
+get f3(arg) => null; /// 02: compile-time error
+get f4([arg]) => null; /// 03: compile-time error
+get f5({arg}) => null; /// 04: compile-time error
+
+main() {
+ f1;
+ f2; /// 01: continued
ahe 2013/08/06 14:25:06 Remove continued from lines 15-18.
Johnni Winther 2013/08/07 06:35:17 Done.
+ f3; /// 02: continued
+ f4; /// 03: continued
+ f5; /// 04: continued
+}
+

Powered by Google App Engine
This is Rietveld 408576698