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

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

Issue 1609093003: fixes #25482, flatten Futures in strong mode so Future.then works (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
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 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 * [FieldElement] associated with the parameter. 2501 * [FieldElement] associated with the parameter.
2502 */ 2502 */
2503 class FieldFormalParameterElementImpl extends ParameterElementImpl 2503 class FieldFormalParameterElementImpl extends ParameterElementImpl
2504 implements FieldFormalParameterElement { 2504 implements FieldFormalParameterElement {
2505 /** 2505 /**
2506 * The field associated with this field formal parameter. 2506 * The field associated with this field formal parameter.
2507 */ 2507 */
2508 FieldElement field; 2508 FieldElement field;
2509 2509
2510 /** 2510 /**
2511 * Initialize a newly created parameter element to have the given [name].
2512 */
2513 FieldFormalParameterElementImpl(Identifier name) : super.forNode(name);
2514
2515 /**
2511 * Initialize a newly created parameter element to have the given [name] and 2516 * Initialize a newly created parameter element to have the given [name] and
2512 * [offset]. 2517 * [offset].
2513 */ 2518 */
2514 FieldFormalParameterElementImpl.forNameAndOffset(String name, int nameOffset) 2519 FieldFormalParameterElementImpl.forNameAndOffset(String name, int nameOffset)
2515 : super(name, nameOffset); 2520 : super(name, nameOffset);
2516 2521
2517 /**
2518 * Initialize a newly created parameter element to have the given [name].
2519 */
2520 FieldFormalParameterElementImpl(Identifier name) : super.forNode(name);
2521
2522 @override 2522 @override
2523 bool get isInitializingFormal => true; 2523 bool get isInitializingFormal => true;
2524 2524
2525 @override 2525 @override
2526 accept(ElementVisitor visitor) => 2526 accept(ElementVisitor visitor) =>
2527 visitor.visitFieldFormalParameterElement(this); 2527 visitor.visitFieldFormalParameterElement(this);
2528 } 2528 }
2529 2529
2530 /** 2530 /**
2531 * A concrete implementation of a [FunctionElement]. 2531 * A concrete implementation of a [FunctionElement].
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
3096 } 3096 }
3097 } 3097 }
3098 this._imports = imports; 3098 this._imports = imports;
3099 } 3099 }
3100 3100
3101 @override 3101 @override
3102 bool get isBrowserApplication => 3102 bool get isBrowserApplication =>
3103 entryPoint != null && isOrImportsBrowserLibrary; 3103 entryPoint != null && isOrImportsBrowserLibrary;
3104 3104
3105 @override 3105 @override
3106 bool get isDartAsync => name == "dart.async";
3107
3108 @override
3106 bool get isDartCore => name == "dart.core"; 3109 bool get isDartCore => name == "dart.core";
3107 3110
3108 @override 3111 @override
3109 bool get isInSdk => 3112 bool get isInSdk =>
3110 StringUtilities.startsWith5(name, 0, 0x64, 0x61, 0x72, 0x74, 0x2E); 3113 StringUtilities.startsWith5(name, 0, 0x64, 0x61, 0x72, 0x74, 0x2E);
3111 3114
3112 /** 3115 /**
3113 * Return `true` if the receiver directly or indirectly imports the 3116 * Return `true` if the receiver directly or indirectly imports the
3114 * 'dart:html' libraries. 3117 * 'dart:html' libraries.
3115 */ 3118 */
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
4595 4598
4596 @override 4599 @override
4597 void visitElement(Element element) { 4600 void visitElement(Element element) {
4598 int offset = element.nameOffset; 4601 int offset = element.nameOffset;
4599 if (offset != -1) { 4602 if (offset != -1) {
4600 map[offset] = element; 4603 map[offset] = element;
4601 } 4604 }
4602 super.visitElement(element); 4605 super.visitElement(element);
4603 } 4606 }
4604 } 4607 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698