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

Side by Side Diff: tests/language_strong/abstract_getter2_test.dart

Issue 2571363002: fixes #27385, implement virtual fields in DDC (Closed)
Patch Set: format Created 4 years 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 class A {
8 int get x => 100;
9 }
10
11 abstract class B extends A {
12 int _x;
13
14 int get x;
15 set x(int v) { _x = v; }
16 }
17
18 class C extends B {
19 int get x => super.x;
20 }
21
22 void main() {
23 B b = new C();
24 b.x = 42;
25 Expect.equals(b._x, 42);
26 Expect.equals(b.x, 100);
27 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/test/not_yet_strong_tests.dart ('k') | tests/language_strong/closure_with_super_field_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698