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

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

Issue 2849893002: Set 'enclosingElement' for FunctionElementImpl_forLUB. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/resynthesize.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) 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 4525 matching lines...) Expand 10 before | Expand all | Expand 10 after
4536 4536
4537 @override 4537 @override
4538 bool get isSynthetic => true; 4538 bool get isSynthetic => true;
4539 } 4539 }
4540 4540
4541 /** 4541 /**
4542 * Implementation of [FunctionElementImpl] for a synthetic function element 4542 * Implementation of [FunctionElementImpl] for a synthetic function element
4543 * that was synthesized by a LUB computation. 4543 * that was synthesized by a LUB computation.
4544 */ 4544 */
4545 class FunctionElementImpl_forLUB extends FunctionElementImpl { 4545 class FunctionElementImpl_forLUB extends FunctionElementImpl {
4546 @override
4547 final CompilationUnitElementImpl enclosingUnit;
4548
4549 @override
4550 final TypeParameterizedElementMixin enclosingTypeParameterContext;
4551
4552 final EntityRef _entityRef; 4546 final EntityRef _entityRef;
4553 4547
4554 FunctionElementImpl_forLUB( 4548 FunctionElementImpl_forLUB(ElementImpl enclosingElement, this._entityRef)
4555 this.enclosingUnit, this.enclosingTypeParameterContext, this._entityRef) 4549 : super.forSerialized(null, enclosingElement);
4556 : super('', -1);
4557 4550
4558 @override 4551 @override
4559 bool get isSynthetic => true; 4552 bool get isSynthetic => true;
4560 4553
4561 @override 4554 @override
4562 List<ParameterElement> get parameters { 4555 List<ParameterElement> get parameters {
4563 return _parameters ??= ParameterElementImpl 4556 return _parameters ??= ParameterElementImpl
4564 .resynthesizeList(_entityRef.syntheticParams, this, synthetic: true); 4557 .resynthesizeList(_entityRef.syntheticParams, this, synthetic: true);
4565 } 4558 }
4566 4559
(...skipping 4532 matching lines...) Expand 10 before | Expand all | Expand 10 after
9099 9092
9100 @override 9093 @override
9101 void visitElement(Element element) { 9094 void visitElement(Element element) {
9102 int offset = element.nameOffset; 9095 int offset = element.nameOffset;
9103 if (offset != -1) { 9096 if (offset != -1) {
9104 map[offset] = element; 9097 map[offset] = element;
9105 } 9098 }
9106 super.visitElement(element); 9099 super.visitElement(element);
9107 } 9100 }
9108 } 9101 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698