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

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

Issue 519693002: Properly handle forwarding factory constructors in type inference. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Regression test for dart2js bug 18257: Properly infer types for forwarding
6 // factory constructors with optional parameters with default values.
7
8 main() {
9 A a = new A.a1();
10 a.test();
11 }
12
13 class A {
14 final bool condition;
15
16 A({this.condition: true});
17
18 factory A.a1({condition}) = _A1.boo;
19
20 test() {
21 if(condition != true) {
22 throw "FAILED";
23 }
24 }
25 }
26
27 class _A1 extends A {
28 _A1.boo({condition: true}):
29 super(condition: condition);
30 }
31
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698