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

Side by Side Diff: tests/language/deferred_inheritance_constraints_test.dart

Issue 1127363003: Insert the right checks for redirecting factories to deferred constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: update to status-file rebase Created 5 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 unified diff | Download patch | Annotate | Revision Log
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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "deferred_inheritance_constraints_lib.dart" deferred as lib; 6 import "deferred_inheritance_constraints_lib.dart" deferred as lib;
7 7
8 class Foo {} 8 class Foo {}
9 class Foo2 extends D {} 9 class Foo2 extends D {}
10 10
11 class A extends 11 class A extends
12 lib. /// extends: compile-time error 12 lib. /// extends: compile-time error
13 Foo {} 13 Foo {}
14 class B implements 14 class B implements
15 lib. /// implements: compile-time error 15 lib. /// implements: compile-time error
16 Foo {} 16 Foo {}
17 class C1 {} 17 class C1 {}
18 class C = C1 with 18 class C = C1 with
19 lib. /// mixin: compile-time error 19 lib. /// mixin: compile-time error
20 Foo; 20 Foo;
21 21
22 class D { 22 class D {
23 D() ; 23 D() ;
24 factory D.factory() = 24 factory D.factory() =
25 lib. /// redirecting_constructor: static type warning, runtime error 25 lib. /// redirecting_constructor: static type warning
26 Foo2; 26 Foo2;
27 } 27 }
28 28
29 void main() { 29 void main() {
30 new A(); 30 new A();
31 new B(); 31 new B();
32 new C(); 32 new C();
33 new D.factory(); 33 Expect.throws(() { /// redirecting_constructor: continued
34 new D.factory();
35 }); /// redirecting_constructor: continued
34 } 36 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/language/deferred_redirecting_factory_lib1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698