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

Side by Side Diff: pkg/dev_compiler/test/codegen/language/mixin_abstract_getter_test.dart

Issue 2441693003: fix #27643, failed to virtualize fields if an abstract one is mixed in (Closed)
Patch Set: Created 4 years, 2 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
(Empty)
1 // Copyright (c) 2016, 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 import 'package:expect/expect.dart';
6
7 abstract class B {
8 int get x;
9 }
10
11 class C {
12 int get x => 42;
13 }
14
15 class D extends C with B {
16 final int x;
17
18 D(this.x);
19 }
20
21
22 class C2 {
23 int get x => 42;
24 }
25
26 abstract class B2 extends C2 {
27 int get x;
28 }
29
30 class D2 extends B2 {
31 final int x;
32
33 D2(this.x);
34 }
35
36
37 void main() {
38 var d = new D(17);
39 Expect.equals(d.x, 17);
40
41 var d2 = new D2(17);
42 Expect.equals(d.x, 17);
43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698