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

Side by Side Diff: tests/language_2/generic_constructor_mixin_test.dart

Issue 2999733002: Migrate test block 47 and downstream dependencies to Dart 2.0. (Closed)
Patch Set: Whitespace Created 3 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Test that parameter types types are checked correctly in the face of 5 // Test that parameter types types are checked correctly in the face of
6 // mixin application upon a generic constructor. 6 // mixin application upon a generic constructor.
7 7
8 import 'checked_mode_helper.dart'; 8 import 'dynamic_type_helper.dart';
9 9
10 class A<X> { 10 class A<X> {
11 A(X x); 11 A(X x);
12 } 12 }
13 13
14 class B {} 14 class B {}
15 15
16 class C<Y> = A<Y> with B; 16 class C<Y> = A<Y> with B;
17 17
18 void main() { 18 void main() {
19 var v = 0; 19 var v = 0;
20 checkNoDynamicTypeError(() => new C<int>(v)); 20 checkNoDynamicTypeError(() => new C<int>(v));
21 checkDynamicTypeError(() => new C<String>(v)); 21 checkDynamicTypeError(() => new C<String>(v)); //# 01: compile-time error
22 } 22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698