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

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

Issue 2655243007: Fix for invalid 'extends/implements/with SomeEnum'. (Closed)
Patch Set: Created 3 years, 10 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.builder; 5 library analyzer.src.dart.element.builder;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 element.external = true; 149 element.external = true;
150 } 150 }
151 if (node.factoryKeyword != null) { 151 if (node.factoryKeyword != null) {
152 element.factory = true; 152 element.factory = true;
153 } 153 }
154 element.functions = holder.functions; 154 element.functions = holder.functions;
155 element.labels = holder.labels; 155 element.labels = holder.labels;
156 element.localVariables = holder.localVariables; 156 element.localVariables = holder.localVariables;
157 element.parameters = holder.parameters; 157 element.parameters = holder.parameters;
158 element.isConst = node.constKeyword != null; 158 element.isConst = node.constKeyword != null;
159 element.isCycleFree = element.isConst;
159 if (body.isAsynchronous) { 160 if (body.isAsynchronous) {
160 element.asynchronous = true; 161 element.asynchronous = true;
161 } 162 }
162 if (body.isGenerator) { 163 if (body.isGenerator) {
163 element.generator = true; 164 element.generator = true;
164 } 165 }
165 _currentHolder.addConstructor(element); 166 _currentHolder.addConstructor(element);
166 node.element = element; 167 node.element = element;
167 if (constructorName == null) { 168 if (constructorName == null) {
168 Identifier returnType = node.returnType; 169 Identifier returnType = node.returnType;
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 return null; 1626 return null;
1626 } 1627 }
1627 1628
1628 /** 1629 /**
1629 * Return the lexical identifiers associated with the given [identifiers]. 1630 * Return the lexical identifiers associated with the given [identifiers].
1630 */ 1631 */
1631 static List<String> _getIdentifiers(NodeList<SimpleIdentifier> identifiers) { 1632 static List<String> _getIdentifiers(NodeList<SimpleIdentifier> identifiers) {
1632 return identifiers.map((identifier) => identifier.name).toList(); 1633 return identifiers.map((identifier) => identifier.name).toList();
1633 } 1634 }
1634 } 1635 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | pkg/analyzer/lib/src/dart/element/element.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698