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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/resolution/member_impl.dart

Issue 266913017: Convert property methods into getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 6 years, 7 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of resolution.compute_members; 5 part of resolution.compute_members;
6 6
7 class DeclaredMember implements Member { 7 class DeclaredMember implements Member {
8 final Name name; 8 final Name name;
9 final Element element; 9 final Element element;
10 final InterfaceType declarer; 10 final InterfaceType declarer;
11 final DartType type; 11 final DartType type;
12 final FunctionType functionType; 12 final FunctionType functionType;
13 13
14 DeclaredMember(this.name, this.element, 14 DeclaredMember(this.name, this.element,
15 this.declarer, 15 this.declarer,
16 this.type, this.functionType); 16 this.type, this.functionType);
17 17
18 bool get isStatic => !element.isInstanceMember(); 18 bool get isStatic => !element.isInstanceMember;
19 19
20 bool get isGetter => element.isGetter() || (!isSetter && element.isField()); 20 bool get isGetter => element.isGetter || (!isSetter && element.isField);
21 21
22 bool get isSetter => name.isSetter; 22 bool get isSetter => name.isSetter;
23 23
24 bool get isMethod => element.isFunction(); 24 bool get isMethod => element.isFunction;
25 25
26 bool get isDeclaredByField => element.isField(); 26 bool get isDeclaredByField => element.isField;
27 27
28 bool get isAbstract => false; 28 bool get isAbstract => false;
29 29
30 Member get implementation => this; 30 Member get implementation => this;
31 31
32 /// Returns this member as inherited from [instance]. 32 /// Returns this member as inherited from [instance].
33 /// 33 ///
34 /// For instance: 34 /// For instance:
35 /// class A<T> { T m() {} } 35 /// class A<T> { T m() {} }
36 /// class B<S> extends A<S> {} 36 /// class B<S> extends A<S> {}
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 bool get isGetter => false; 247 bool get isGetter => false;
248 248
249 bool get isMethod => false; 249 bool get isMethod => false;
250 250
251 bool get isErroneous => true; 251 bool get isErroneous => true;
252 252
253 String toString() => "erroneous member '$name' synthesized " 253 String toString() => "erroneous member '$name' synthesized "
254 "from ${inheritedMembers}"; 254 "from ${inheritedMembers}";
255 } 255 }
256 256
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698