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

Unified Diff: tests/language/generic_constructor_mixin3_test.dart

Issue 246563006: Handle generic parameters in synthesized constructor for mixin applications. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment Created 6 years, 8 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/generic_constructor_mixin3_test.dart
diff --git a/tests/language/generic_constructor_mixin3_test.dart b/tests/language/generic_constructor_mixin3_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..be43bd3d7fa0ba6ed393e8878c23ff8371f85e6d
--- /dev/null
+++ b/tests/language/generic_constructor_mixin3_test.dart
@@ -0,0 +1,23 @@
+// 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.
+
+// Test that parameter types types are checked correctly in the face of
+// mixin application upon a generic constructor.
+
+import 'checked_mode_helper.dart';
+
+class A<X> {
+ A(X x);
+}
+
+class B {}
+
+class C1 = A<int> with B;
+class C2 = A<String> with B;
+
+void main() {
+ var v = 0;
+ checkNoDynamicTypeError(() => new C1(v));
+ checkDynamicTypeError(() => new C2(v));
+}
« no previous file with comments | « tests/language/generic_constructor_mixin2_test.dart ('k') | tests/language/generic_constructor_mixin_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698