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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 246733004: Don't use fatal errors in message_kind_test.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Restore white lists, safe reuse. Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element get currentElement; 8 Element get currentElement;
9 Setlet<Node> get superUses; 9 Setlet<Node> get superUses;
10 10
(...skipping 4417 matching lines...) Expand 10 before | Expand all | Expand 10 after
4428 } 4428 }
4429 4429
4430 Identifier visitSendSet(SendSet node) { 4430 Identifier visitSendSet(SendSet node) {
4431 assert(node.arguments.tail.isEmpty); // Sanity check 4431 assert(node.arguments.tail.isEmpty); // Sanity check
4432 Identifier identifier = node.selector; 4432 Identifier identifier = node.selector;
4433 String name = identifier.source; 4433 String name = identifier.source;
4434 VariableDefinitionScope scope = 4434 VariableDefinitionScope scope =
4435 new VariableDefinitionScope(resolver.scope, name); 4435 new VariableDefinitionScope(resolver.scope, name);
4436 resolver.visitIn(node.arguments.head, scope); 4436 resolver.visitIn(node.arguments.head, scope);
4437 if (scope.variableReferencedInInitializer) { 4437 if (scope.variableReferencedInInitializer) {
4438 resolver.error(identifier, MessageKind.REFERENCE_IN_INITIALIZATION, 4438 compiler.reportError(
4439 {'variableName': name}); 4439 identifier, MessageKind.REFERENCE_IN_INITIALIZATION,
4440 {'variableName': name});
4440 } 4441 }
4441 return identifier; 4442 return identifier;
4442 } 4443 }
4443 4444
4444 Identifier visitIdentifier(Identifier node) { 4445 Identifier visitIdentifier(Identifier node) {
4445 // The variable is initialized to null. 4446 // The variable is initialized to null.
4446 resolver.world.registerInstantiatedClass(compiler.nullClass, 4447 resolver.world.registerInstantiatedClass(compiler.nullClass,
4447 resolver.mapping); 4448 resolver.mapping);
4448 if (definitions.modifiers.isConst()) { 4449 if (definitions.modifiers.isConst()) {
4449 compiler.reportError(node, MessageKind.CONST_WITHOUT_INITIALIZER); 4450 compiler.reportError(node, MessageKind.CONST_WITHOUT_INITIALIZER);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
4664 TreeElements _treeElements; 4665 TreeElements _treeElements;
4665 4666
4666 bool get hasTreeElements => _treeElements != null; 4667 bool get hasTreeElements => _treeElements != null;
4667 4668
4668 TreeElements get treeElements { 4669 TreeElements get treeElements {
4669 assert(invariant(this, _treeElements !=null, 4670 assert(invariant(this, _treeElements !=null,
4670 message: "TreeElements have not been computed for $this.")); 4671 message: "TreeElements have not been computed for $this."));
4671 return _treeElements; 4672 return _treeElements;
4672 } 4673 }
4673 } 4674 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698