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

Unified Diff: tests/language/src/GetSetSyntaxTest.dart

Issue 9350016: Add test cases for issue 1569. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review feedback. Created 8 years, 10 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 | « tests/language/language-leg.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/GetSetSyntaxTest.dart
diff --git a/tests/language/src/GetSetSyntaxTest.dart b/tests/language/src/GetSetSyntaxTest.dart
new file mode 100644
index 0000000000000000000000000000000000000000..594ded1f87c881d91725fbb8267a53a076f0261e
--- /dev/null
+++ b/tests/language/src/GetSetSyntaxTest.dart
@@ -0,0 +1,47 @@
+// Copyright (c) 2012, 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.
+
+var get;
+var get a; /// 00: compile-time error
+var get b, c; /// 01: compile-time error
+
+var set;
+var set d; /// 02: compile-time error
+var set e, f; /// 03: compile-time error
+
+class C0 {
+ var get;
+ var get a; /// 04: compile-time error
+ var get b, c; /// 05: compile-time error
+
+ var set;
+ var set d; /// 06: compile-time error
+ var set e, f; /// 07: compile-time error
+}
+
+class C1 {
+ List get;
+ List get a; /// 08: compile-time error
+ List get b, c; /// 09: compile-time error
+
+ List set;
+ List set d; /// 10: compile-time error
+ List set e, f; /// 11: compile-time error
+}
+
+class C2 {
+ List<int> get;
+ List<int> get a; /// 12: compile-time error
+ List<int> get b, c; /// 13: compile-time error
+
+ List<int> set;
+ List<int> set d; /// 14: compile-time error
+ List<int> set e, f; /// 15: compile-time error
+}
+
+main() {
+ new C0();
+ new C1();
+ new C2();
+}
« no previous file with comments | « tests/language/language-leg.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698