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

Unified Diff: tests/language/mixin_forwarding_constructor3_test.dart

Issue 707073002: Fix analyzer's treatment of mixin constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve error message. Created 6 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
Index: tests/language/mixin_forwarding_constructor3_test.dart
diff --git a/tests/language/mixin_forwarding_constructor1_test.dart b/tests/language/mixin_forwarding_constructor3_test.dart
similarity index 65%
copy from tests/language/mixin_forwarding_constructor1_test.dart
copy to tests/language/mixin_forwarding_constructor3_test.dart
index b0e97ab7af286a6f84dc9aaa9947090d125b3f96..1d2f5dc694ef3f97c698fb4b4152b8ab93f3eb21 100644
--- a/tests/language/mixin_forwarding_constructor1_test.dart
+++ b/tests/language/mixin_forwarding_constructor3_test.dart
@@ -1,7 +1,10 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2014, 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.
+// Verify that a named mixin constructor forwards to the corresponding named
+// base class constructor.
+
import "package:expect/expect.dart";
abstract class Mixin1 {
@@ -14,12 +17,14 @@ abstract class Mixin2 {
class A {
var superField;
- A(foo) : superField = foo;
+ A(foo) : superField = 0;
+ A.c1(foo) : superField = foo;
+ A.c2(foo) : superField = 0;
}
class B extends A with Mixin1, Mixin2 {
var field = 4;
- B(unused) : super(3);
+ B(unused) : super.c1(3);
}
main() {
« no previous file with comments | « tests/language/mixin_forwarding_constructor2_test.dart ('k') | tests/language/mixin_forwarding_constructor4_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698