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

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

Issue 17583007: Fix issue 11398 by making sure we look at mixin applications (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
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 import "package:expect/expect.dart";
6
7 void main() {
8 var hva = new HasValueA();
9 hva.value = '42';
10 Expect.equals('42', hva.value);
11
12 var hvb = new HasValueB();
13 hvb.value = '87';
14 Expect.equals('87', hvb.value);
15
16 var hvc = new HasValueC();
17 hvc.value = '99';
18 Expect.equals('99', hvc.value);
19 }
20
21 abstract class Delegate {
22 String invoke(String value);
23 }
24
25 abstract class DelegateMixin {
26 String invoke(String value) => value;
27 }
28
29 abstract class HasValueMixin implements Delegate {
30 String _value;
31 set value(String value) { _value = invoke(value); }
32 String get value => _value;
33 }
34
35 class HasValueA extends Object with HasValueMixin, DelegateMixin {
36 }
37
38 class HasValueB extends Object with DelegateMixin, HasValueMixin {
39 }
40
41 class HasValueC extends Object with HasValueMixin {
42 String invoke(String value) => value;
43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698