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

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

Issue 1161823004: Handle .fromEnvironment and incompatible constructor invocations (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
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/access_semantics.dart
diff --git a/pkg/compiler/lib/src/resolution/access_semantics.dart b/pkg/compiler/lib/src/resolution/access_semantics.dart
index 0e1be6f2942efbcbc3a813aa84da49f734c57f5e..624a861ea50120bc280f964d6501e0e5e67d1067 100644
--- a/pkg/compiler/lib/src/resolution/access_semantics.dart
+++ b/pkg/compiler/lib/src/resolution/access_semantics.dart
@@ -474,6 +474,17 @@ enum ConstructorAccessKind {
/// m() => new C();
///
ERRONEOUS_REDIRECTING_FACTORY,
+
+
+ /// An invocation of a constructor with incompatible arguments.
+ ///
+ /// For instance
+ /// class C {
+ /// C();
+ /// }
+ /// m() => new C(true);
+ ///
+ INCOMPATIBLE,
}
/// Data structure used to classify the semantics of a constructor invocation.
@@ -499,8 +510,11 @@ class ConstructorAccessSemantics {
kind == ConstructorAccessKind.UNRESOLVED_TYPE ||
kind == ConstructorAccessKind.UNRESOLVED_CONSTRUCTOR ||
kind == ConstructorAccessKind.NON_CONSTANT_CONSTRUCTOR ||
- kind == ConstructorAccessKind.ERRONEOUS_REDIRECTING_FACTORY;
+ kind == ConstructorAccessKind.ERRONEOUS_REDIRECTING_FACTORY ||
+ kind == ConstructorAccessKind.INCOMPATIBLE;
}
+
+ String toString() => 'ConstructorAccessSemantics($kind,$element,$type)';
karlklose 2015/06/01 11:47:26 Add spaces after ','?
Johnni Winther 2015/06/01 13:13:43 Done.
}
/// Data structure used to classify the semantics of a redirecting factory

Powered by Google App Engine
This is Rietveld 408576698