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

Side by Side Diff: tests/lib/mirrors/declarations_model_easier.dart

Issue 137123005: dart2js: Implement instanceMembers and staticMembers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
« no previous file with comments | « tests/lib/lib.status ('k') | tests/lib/mirrors/instance_members_easier_test.dart » ('j') | 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 library test.declarations_model;
6
7 var libraryVariable;
8 get libraryGetter => null;
9 set librarySetter(x) => x;
10 libraryMethod() => null;
11
12 typedef bool Predicate(dynamic);
13
14 abstract class Interface<I> {
15 operator /(x) => null;
16
17 var interfaceInstanceVariable;
18 get interfaceInstanceGetter;
19 set interfaceInstanceSetter(x);
20 interfaceInstanceMethod();
21
22 static var interfaceStaticVariable;
23 static get interfaceStaticGetter => null;
24 static set interfaceStaticSetter(x) => x;
25 static interfaceStaticMethod() => null;
26 }
27
28 class Superclass<S> {
29 operator -(x) => null;
30
31 var inheritedInstanceVariable;
32 get inheritedInstanceGetter => null;
33 set inheritedInstanceSetter(x) => x;
34 inheritedInstanceMethod() => null;
35
36 static var inheritedStaticVariable;
37 static get inheritedStaticGetter => null;
38 static set inheritedStaticSetter(x) => x;
39 static inheritedStaticMethod() => null;
40
41 Superclass.inheritedGenerativeConstructor(this.inheritedInstanceVariable);
42 Superclass.inheritedRedirectingConstructor(x)
43 : this.inheritedGenerativeConstructor(x*2);
44 factory Superclass.inheritedNormalFactory(y)
45 => new Superclass.inheritedRedirectingConstructor(y*3);
46 factory Superclass.inheritedRedirectingFactory(z)
47 = Superclass.inheritedNormalFactory;
48 }
49
50 abstract class Class<C>
51 extends Superclass<C> implements Interface<C> {
52 operator +(x) => null;
53
54 abstractMethod();
55
56 var instanceVariable;
57 get instanceGetter => null;
58 set instanceSetter(x) => x;
59 instanceMethod() => null;
60
61 static var staticVariable;
62 static get staticGetter => null;
63 static set staticSetter(x) => x;
64 static staticMethod() => null;
65
66 Class.generativeConstructor(this.instanceVariable)
67 : super.inheritedGenerativeConstructor(0);
68 Class.redirectingConstructor(x)
69 : this.generativeConstructor(x*2);
70 factory Class.normalFactory(y) => new ConcreteClass(y*3);
71 factory Class.redirectingFactory(z) = Class.normalFactory;
72 }
73
74 // This is just here as a target of Class's factories to appease the analyzer.
75 class ConcreteClass<CC> extends Class<CC> {
76 abstractMethod() {}
77
78 operator /(x) => null;
79
80 var interfaceInstanceVariable;
81 get interfaceInstanceGetter => null;
82 set interfaceInstanceSetter(x) => null;
83 interfaceInstanceMethod() => null;
84
85 ConcreteClass(x) : super.generativeConstructor(x);
86 }
OLDNEW
« no previous file with comments | « tests/lib/lib.status ('k') | tests/lib/mirrors/instance_members_easier_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698