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

Side by Side Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 886633003: Fix remaining uses of lookupConstructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | 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 AnalyzableElement get analyzedElement; 8 AnalyzableElement get analyzedElement;
9 Iterable<Node> get superUses; 9 Iterable<Node> get superUses;
10 10
(...skipping 4798 matching lines...) Expand 10 before | Expand all | Expand 10 after
4809 registry.registerThrowRuntimeError(); 4809 registry.registerThrowRuntimeError();
4810 } 4810 }
4811 if (inConstContext) { 4811 if (inConstContext) {
4812 compiler.reportError(diagnosticNode, kind, arguments); 4812 compiler.reportError(diagnosticNode, kind, arguments);
4813 } else { 4813 } else {
4814 compiler.reportWarning(diagnosticNode, kind, arguments); 4814 compiler.reportWarning(diagnosticNode, kind, arguments);
4815 } 4815 }
4816 return new ErroneousElementX(kind, arguments, targetName, enclosing); 4816 return new ErroneousElementX(kind, arguments, targetName, enclosing);
4817 } 4817 }
4818 4818
4819 Selector createConstructorSelector(String constructorName) {
4820 return constructorName == ''
4821 ? new Selector.callDefaultConstructor(
4822 resolver.enclosingElement.library)
4823 : new Selector.callConstructor(
4824 constructorName,
4825 resolver.enclosingElement.library);
4826 }
4827
4828 FunctionElement resolveConstructor(ClassElement cls, 4819 FunctionElement resolveConstructor(ClassElement cls,
4829 Node diagnosticNode, 4820 Node diagnosticNode,
4830 String constructorName) { 4821 String constructorName) {
4831 cls.ensureResolved(compiler); 4822 cls.ensureResolved(compiler);
4832 Element result = cls.lookupConstructor(constructorName); 4823 Element result = cls.lookupConstructor(constructorName);
4833 if (result == null) { 4824 if (result == null) {
4834 String fullConstructorName = Elements.constructorNameForDiagnostics( 4825 String fullConstructorName = Elements.constructorNameForDiagnostics(
4835 cls.name, 4826 cls.name,
4836 constructorName); 4827 constructorName);
4837 return failOrReturnErroneousElement( 4828 return failOrReturnErroneousElement(
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
5042 } 5033 }
5043 5034
5044 /// The result for the resolution of the `assert` method. 5035 /// The result for the resolution of the `assert` method.
5045 class AssertResult implements ResolutionResult { 5036 class AssertResult implements ResolutionResult {
5046 const AssertResult(); 5037 const AssertResult();
5047 5038
5048 Element get element => null; 5039 Element get element => null;
5049 5040
5050 String toString() => 'AssertResult()'; 5041 String toString() => 'AssertResult()';
5051 } 5042 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698