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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 1833743002: Resynthesize _DeferredClassElement instead of actual ClassElementImpl. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.src.dart.element.element; 5 library analyzer.src.dart.element.element;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' show min; 8 import 'dart:math' show min;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 } 1075 }
1076 1076
1077 @override 1077 @override
1078 List<ClassElement> get types => _types; 1078 List<ClassElement> get types => _types;
1079 1079
1080 /** 1080 /**
1081 * Set the types contained in this compilation unit to the given [types]. 1081 * Set the types contained in this compilation unit to the given [types].
1082 */ 1082 */
1083 void set types(List<ClassElement> types) { 1083 void set types(List<ClassElement> types) {
1084 for (ClassElement type in types) { 1084 for (ClassElement type in types) {
1085 (type as ClassElementImpl).enclosingElement = this; 1085 if (type is ClassElementImpl) {
Paul Berry 2016/03/24 19:40:14 Nit: it's not obvious without reading the rest of
1086 type.enclosingElement = this;
1087 }
1086 } 1088 }
1087 this._types = types; 1089 this._types = types;
1088 } 1090 }
1089 1091
1090 @override 1092 @override
1091 bool operator ==(Object object) => 1093 bool operator ==(Object object) =>
1092 object is CompilationUnitElementImpl && source == object.source; 1094 object is CompilationUnitElementImpl && source == object.source;
1093 1095
1094 @override 1096 @override
1095 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this); 1097 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this);
(...skipping 3848 matching lines...) Expand 10 before | Expand all | Expand 10 after
4944 4946
4945 @override 4947 @override
4946 void visitElement(Element element) { 4948 void visitElement(Element element) {
4947 int offset = element.nameOffset; 4949 int offset = element.nameOffset;
4948 if (offset != -1) { 4950 if (offset != -1) {
4949 map[offset] = element; 4951 map[offset] = element;
4950 } 4952 }
4951 super.visitElement(element); 4953 super.visitElement(element);
4952 } 4954 }
4953 } 4955 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698