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

Unified Diff: pkg/compiler/lib/src/resolution/send_resolver.dart

Issue 1130773002: Differentiate between unresolved class and constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/resolution/send_resolver.dart
diff --git a/pkg/compiler/lib/src/resolution/send_resolver.dart b/pkg/compiler/lib/src/resolution/send_resolver.dart
index b8eeb2fed37369f53c94d4f66365632b04a4e9ed..7ff21568011e2c6e5018b9f465a622d3eb2e564c 100644
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart
@@ -419,8 +419,15 @@ abstract class SendResolverMixin {
ConstructorElement constructor,
DartType type) {
if (constructor.isErroneous) {
+ if (constructor is ErroneousElement) {
+ ErroneousElement error = constructor;
+ if (error.messageKind == MessageKind.CANNOT_FIND_CONSTRUCTOR) {
+ return new ConstructorAccessSemantics(
+ ConstructorAccessKind.UNRESOLVED_CONSTRUCTOR, constructor, type);
+ }
+ }
return new ConstructorAccessSemantics(
- ConstructorAccessKind.ERRONEOUS, constructor, type);
+ ConstructorAccessKind.UNRESOLVED_TYPE, constructor, type);
} else if (constructor.isRedirectingFactory) {
ConstructorElement effectiveTarget = constructor.effectiveTarget;
if (effectiveTarget == constructor ||
@@ -482,7 +489,7 @@ abstract class SendResolverMixin {
// This is a non-constant constant constructor invocation, like
// `const Const(method())`.
constructorAccessSemantics = new ConstructorAccessSemantics(
- ConstructorAccessKind.ERRONEOUS, element, type);
+ ConstructorAccessKind.NON_CONSTANT_CONSTRUCTOR, element, type);
} else {
constructorAccessSemantics =
computeConstructorAccessSemantics(element, type);
« no previous file with comments | « pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart ('k') | pkg/compiler/lib/src/resolution/send_structure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698