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

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

Issue 8724015: Properly detect name collisions at library level (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 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 | « tests/language/src/ToplevelCollision1Test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/ToplevelCollision2Test.dart
===================================================================
--- tests/language/src/ToplevelCollision2Test.dart (revision 0)
+++ tests/language/src/ToplevelCollision2Test.dart (revision 0)
@@ -0,0 +1,20 @@
+// Copyright (c) 2011, 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.
+
+
+get x() => 200;
+
+// Ok: can have a setter named x when getter x is defined.
+set x(var i) { print(i); }
srdjan 2011/11/30 00:37:35 Add: /// 02: continued so that there is a version
hausner 2011/11/30 18:52:48 Doesn't work that way, apparently. Omitting as per
+
+// Error: there is already a getter for x
+int x; /// 00: compile-time error
+
+// Error: there is already a getter named x.
+int x(a, b) { print(a + b); } /// 01: compile-time error
+
+
+void main() {
+ // No need to reference x.
+}
« no previous file with comments | « tests/language/src/ToplevelCollision1Test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698