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

Side by Side Diff: pkg/compiler/lib/src/elements/elements.dart

Issue 2791993002: Fix dart2js warnings and add test to ensure it stays clean. (Closed)
Patch Set: Address comments and fix duplicated library names. Created 3 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | pkg/compiler/lib/src/inferrer/builder_kernel.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library elements; 5 library elements;
6 6
7 import 'package:front_end/src/fasta/parser/async_modifier.dart' 7 import 'package:front_end/src/fasta/parser/async_modifier.dart'
8 show AsyncModifier; 8 show AsyncModifier;
9 9
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 element.enclosingElement != null && 463 element.enclosingElement != null &&
464 (element.enclosingElement.kind == ElementKind.CLASS || 464 (element.enclosingElement.kind == ElementKind.CLASS ||
465 element.enclosingElement.kind == ElementKind.COMPILATION_UNIT || 465 element.enclosingElement.kind == ElementKind.COMPILATION_UNIT ||
466 element.enclosingElement.kind == ElementKind.LIBRARY || 466 element.enclosingElement.kind == ElementKind.LIBRARY ||
467 element.enclosingElement.kind == ElementKind.PREFIX); 467 element.enclosingElement.kind == ElementKind.PREFIX);
468 } 468 }
469 469
470 static bool isInStaticContext(Element element) { 470 static bool isInStaticContext(Element element) {
471 if (isUnresolved(element)) return true; 471 if (isUnresolved(element)) return true;
472 if (element.enclosingElement.isClosure) { 472 if (element.enclosingElement.isClosure) {
473 var closureClass = element.enclosingElement; 473 dynamic closureClass = element.enclosingElement;
474 // ignore: UNDEFINED_GETTER
474 element = closureClass.methodElement; 475 element = closureClass.methodElement;
475 } 476 }
476 Element outer = element.outermostEnclosingMemberOrTopLevel; 477 Element outer = element.outermostEnclosingMemberOrTopLevel;
477 if (isUnresolved(outer)) return true; 478 if (isUnresolved(outer)) return true;
478 if (outer.isTopLevel) return true; 479 if (outer.isTopLevel) return true;
479 if (outer.isGenerativeConstructor) return false; 480 if (outer.isGenerativeConstructor) return false;
480 if (outer.isInstanceMember) return false; 481 if (outer.isInstanceMember) return false;
481 return true; 482 return true;
482 } 483 }
483 484
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 /// by a field. 2028 /// by a field.
2028 bool get isDeclaredByField; 2029 bool get isDeclaredByField;
2029 2030
2030 /// Returns `true` if this member is abstract. 2031 /// Returns `true` if this member is abstract.
2031 bool get isAbstract; 2032 bool get isAbstract;
2032 2033
2033 /// If abstract, [implementation] points to the overridden concrete member, 2034 /// If abstract, [implementation] points to the overridden concrete member,
2034 /// if any. Otherwise [implementation] points to the member itself. 2035 /// if any. Otherwise [implementation] points to the member itself.
2035 Member get implementation; 2036 Member get implementation;
2036 } 2037 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | pkg/compiler/lib/src/inferrer/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698