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

Side by Side Diff: tests/kernel/unsorted/super_mixin_test.dart

Issue 2434123003: Merge more Kernel infrastructure from kernel_sdk SDK fork. (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 import 'expect.dart';
Kevin Millikin (Google) 2016/10/21 09:10:58 Copyright header.
Vyacheslav Egorov (Google) 2016/10/21 13:39:43 Done.
2
3 class Base {
4 var field;
5
6 method(x) {
7 print(x);
8 return x;
9 }
10
11 set setter(x) {
12 print(x);
13 field = x;
14 }
15 }
16
17 class Mixin {
18 method(x) {
19 return super.method(x + 'Mixin');
20 }
21
22 set setter(x) {
23 super.setter = x + 'Mixin';
24 }
25 }
26
27 class Sub extends Base with Mixin {
28 }
29
30 main() {
31 var object = new Sub();
32 Expect.isTrue(object.method('x') == 'xMixin');
33 object.setter = 'y';
34 Expect.isTrue(object.field == 'yMixin');
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698