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

Side by Side Diff: tests/compiler/dart2js_extra/29130_test.dart

Issue 2767103003: Fix #29130: only consider classes allocated with generative constructors as potential closures (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_engine.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) 2013, 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 /// This is a regression test from issue #29310. The global type-inferrer does
6 /// tracing of closures including allocated classes that implement a `call`
7 /// method. We incorrectly considered also classes with invoked factory
8 /// constructors, even if those were only abstract interfaces or mixins that
9 /// weren't actually allocated explicitly.
10 library regression_29130;
11
12 main() {
13 new B();
14 new C();
15 }
16
17 class A {
18 call() {}
19 }
20
21 // interface scenario: we shouldn't trace B
22 abstract class B implements A {
23 factory B() => null;
24 }
25
26 // mixin scenario: we should trace C, but we should trace _C
27 abstract class C implements A {
28 factory C() => new D();
29 }
30
31 class D = A with C;
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_engine.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698