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

Unified Diff: tests/language/regress_10996_test.dart

Issue 15959017: Fix issue with dart2dart translation of parameters (collision risk). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/regress_10996_test.dart
diff --git a/tests/language/regress_10996_test.dart b/tests/language/regress_10996_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..4aefa941e61d43fac87da82efc2ca9be17c3d837
--- /dev/null
+++ b/tests/language/regress_10996_test.dart
@@ -0,0 +1,21 @@
+// 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.
+
+import "package:expect/expect.dart";
+import "regress_10996_lib.dart" as lib;
+
+foo(a, [b]) {
+ return a + b + lib.a + lib.b;
+}
+
+bar(c, {d}) {
+ return c + d + lib.c + lib.d;
+}
+
+main() {
+ Expect.equals(1 + 2 + 3 + 4, foo(1, 2));
+ Expect.equals(7 + 8 + 3 + 4, foo(7, 8));
+ Expect.equals(3 + 4 + 5 + 6, bar(3, d: 4));
+ Expect.equals(7 + 8 + 5 + 6, bar(7, d: 8));
+}

Powered by Google App Engine
This is Rietveld 408576698