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..17ec4adabc49af4aee3af3b32485884feadcf0a1 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)'; |
} |
/// Data structure used to classify the semantics of a redirecting factory |