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

Unified Diff: pkg/compiler/lib/src/resolution/access_semantics.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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/semantic_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/access_semantics.dart
diff --git a/pkg/compiler/lib/src/resolution/access_semantics.dart b/pkg/compiler/lib/src/resolution/access_semantics.dart
index ecd16c0f8d938033c3db285adce90d73c0051609..c445c58c0ac1a533d872b24fbc1cf678abf0fa75 100644
--- a/pkg/compiler/lib/src/resolution/access_semantics.dart
+++ b/pkg/compiler/lib/src/resolution/access_semantics.dart
@@ -388,17 +388,32 @@ enum ConstructorAccessKind {
///
ABSTRACT,
- /// An invocation of an unresolved constructor or an unresolved type.
+ /// An invocation of a constructor on an unresolved type.
+ ///
+ /// For instance
+ /// m() => new Unresolved();
+ ///
+ UNRESOLVED_TYPE,
+
+ /// An invocation of an unresolved constructor.
+ ///
+ /// For instance
+ /// class C {
+ /// C();
+ /// }
+ /// m() => new C.unresolved();
+ ///
+ UNRESOLVED_CONSTRUCTOR,
+
+ /// An const invocation of an non-constant constructor.
///
/// For instance
/// class C {
/// C();
/// }
- /// m1() => new C.unresolved();
- /// m2() => new Unresolved();
+ /// m() => const C();
///
- // TODO(johnniwinther): Differentiate between error types.
- ERRONEOUS,
+ NON_CONSTANT_CONSTRUCTOR,
/// An invocation of an ill-defined redirecting factory constructor.
///
@@ -431,7 +446,9 @@ class ConstructorAccessSemantics {
/// `true` if this invocation is erroneous.
bool get isErroneous {
return kind == ConstructorAccessKind.ABSTRACT ||
- kind == ConstructorAccessKind.ERRONEOUS ||
+ kind == ConstructorAccessKind.UNRESOLVED_TYPE ||
+ kind == ConstructorAccessKind.UNRESOLVED_CONSTRUCTOR ||
+ kind == ConstructorAccessKind.NON_CONSTANT_CONSTRUCTOR ||
kind == ConstructorAccessKind.ERRONEOUS_REDIRECTING_FACTORY;
}
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/semantic_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698