Chromium Code Reviews| 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 |