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

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

Issue 2047103002: Don't prevent 'isCycleFree' updating for resynthesized constructors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | no next file » | 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 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 bool get isCycleFree { 2064 bool get isCycleFree {
2065 if (serializedExecutable != null) { 2065 if (serializedExecutable != null) {
2066 return serializedExecutable.isConst && 2066 return serializedExecutable.isConst &&
2067 !enclosingUnit.resynthesizerContext 2067 !enclosingUnit.resynthesizerContext
2068 .isInConstCycle(serializedExecutable.constCycleSlot); 2068 .isInConstCycle(serializedExecutable.constCycleSlot);
2069 } 2069 }
2070 return _isCycleFree; 2070 return _isCycleFree;
2071 } 2071 }
2072 2072
2073 void set isCycleFree(bool isCycleFree) { 2073 void set isCycleFree(bool isCycleFree) {
2074 assert(serializedExecutable == null);
2075 _isCycleFree = isCycleFree; 2074 _isCycleFree = isCycleFree;
2076 } 2075 }
2077 2076
2078 @override 2077 @override
2079 bool get isDefaultConstructor { 2078 bool get isDefaultConstructor {
2080 // unnamed 2079 // unnamed
2081 String name = this.name; 2080 String name = this.name;
2082 if (name != null && name.length != 0) { 2081 if (name != null && name.length != 0) {
2083 return false; 2082 return false;
2084 } 2083 }
(...skipping 6355 matching lines...) Expand 10 before | Expand all | Expand 10 after
8440 8439
8441 @override 8440 @override
8442 void visitElement(Element element) { 8441 void visitElement(Element element) {
8443 int offset = element.nameOffset; 8442 int offset = element.nameOffset;
8444 if (offset != -1) { 8443 if (offset != -1) {
8445 map[offset] = element; 8444 map[offset] = element;
8446 } 8445 }
8447 super.visitElement(element); 8446 super.visitElement(element);
8448 } 8447 }
8449 } 8448 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698