Add overrides/change wrappers for new is->has methods (#517)

* Add overrides/change wrappers for new is->has methods

* fix mixin error
diff --git a/angular_analyzer_plugin/lib/src/facade/exports_compilation_unit_element.dart b/angular_analyzer_plugin/lib/src/facade/exports_compilation_unit_element.dart
index e90aa34..1ac0cbc 100644
--- a/angular_analyzer_plugin/lib/src/facade/exports_compilation_unit_element.dart
+++ b/angular_analyzer_plugin/lib/src/facade/exports_compilation_unit_element.dart
@@ -43,31 +43,61 @@
   int get id => _wrappedUnit.id;
 
   @override
-  bool get isDeprecated => _wrappedUnit.isDeprecated;
-
-  @override
-  bool get isFactory => _wrappedUnit.isFactory;
-
-  @override
-  bool get isJS => false;
-
-  @override
-  bool get isOverride => _wrappedUnit.isOverride;
-
-  @override
   bool get isPrivate => _wrappedUnit.isPrivate;
 
   @override
-  bool get isProtected => _wrappedUnit.isProtected;
-
-  @override
   bool get isPublic => _wrappedUnit.isPublic;
 
   @override
-  bool get isRequired => _wrappedUnit.isRequired;
+  bool get isSynthetic => _wrappedUnit.isSynthetic;
 
   @override
-  bool get isSynthetic => _wrappedUnit.isSynthetic;
+  bool get isDeprecated => hasDeprecated;
+
+  @override
+  bool get isFactory => hasFactory;
+
+  @override
+  bool get isJS => false;
+
+  @override
+  bool get isOverride => hasOverride;
+
+  @override
+  bool get isProtected => hasProtected;
+
+  @override
+  bool get isRequired => hasRequired;
+
+  @override
+  bool get isAlwaysThrows => hasAlwaysThrows;
+
+  @override
+  bool get isVisibleForTesting => hasVisibleForTesting;
+
+  @override
+  bool get hasDeprecated => _wrappedUnit.hasDeprecated;
+
+  @override
+  bool get hasFactory => _wrappedUnit.hasFactory;
+
+  @override
+  bool get hasJS => false;
+
+  @override
+  bool get hasOverride => _wrappedUnit.hasOverride;
+
+  @override
+  bool get hasProtected => _wrappedUnit.hasProtected;
+
+  @override
+  bool get hasRequired => _wrappedUnit.hasRequired;
+
+  @override
+  bool get hasAlwaysThrows => _wrappedUnit.hasAlwaysThrows;
+
+  @override
+  bool get hasVisibleForTesting => _wrappedUnit.hasVisibleForTesting;
 
   @override
   LibraryElement get library => libraryFacade;
@@ -171,12 +201,6 @@
   ClassElement getType(String className) =>
       types.firstWhere((type) => type.name == name, orElse: () => null);
 
-  @override
-  bool get isAlwaysThrows => _wrappedUnit.isAlwaysThrows;
-
-  @override
-  bool get isVisibleForTesting => _wrappedUnit.isVisibleForTesting;
-
   // CompilationUnitFacade's are not used for imports, which have prefixes
   bool _fromThisUnit(ExportedIdentifier export) => export.prefix == '';
 }
diff --git a/angular_analyzer_plugin/lib/src/facade/exports_import_element.dart b/angular_analyzer_plugin/lib/src/facade/exports_import_element.dart
index 778f28d..5e1715d 100644
--- a/angular_analyzer_plugin/lib/src/facade/exports_import_element.dart
+++ b/angular_analyzer_plugin/lib/src/facade/exports_import_element.dart
@@ -44,31 +44,61 @@
   int get id => _wrappedImport.id;
 
   @override
-  bool get isDeprecated => _wrappedImport.isDeprecated;
-
-  @override
-  bool get isFactory => _wrappedImport.isFactory;
-
-  @override
-  bool get isJS => false;
-
-  @override
-  bool get isOverride => _wrappedImport.isOverride;
-
-  @override
   bool get isPrivate => _wrappedImport.isPrivate;
 
   @override
-  bool get isProtected => _wrappedImport.isProtected;
-
-  @override
   bool get isPublic => _wrappedImport.isPublic;
 
   @override
-  bool get isRequired => _wrappedImport.isRequired;
+  bool get isSynthetic => _wrappedImport.isSynthetic;
 
   @override
-  bool get isSynthetic => _wrappedImport.isSynthetic;
+  bool get isDeprecated => hasDeprecated;
+
+  @override
+  bool get isFactory => hasFactory;
+
+  @override
+  bool get isJS => false;
+
+  @override
+  bool get isOverride => hasOverride;
+
+  @override
+  bool get isProtected => hasProtected;
+
+  @override
+  bool get isRequired => hasRequired;
+
+  @override
+  bool get isAlwaysThrows => hasAlwaysThrows;
+
+  @override
+  bool get isVisibleForTesting => hasVisibleForTesting;
+
+  @override
+  bool get hasDeprecated => _wrappedImport.hasDeprecated;
+
+  @override
+  bool get hasFactory => _wrappedImport.hasFactory;
+
+  @override
+  bool get hasJS => false;
+
+  @override
+  bool get hasOverride => _wrappedImport.hasOverride;
+
+  @override
+  bool get hasProtected => _wrappedImport.hasProtected;
+
+  @override
+  bool get hasRequired => _wrappedImport.hasRequired;
+
+  @override
+  bool get hasAlwaysThrows => _wrappedImport.hasAlwaysThrows;
+
+  @override
+  bool get hasVisibleForTesting => _wrappedImport.hasVisibleForTesting;
 
   @override
   LibraryElement get library => libraryFacade;
@@ -139,11 +169,5 @@
   PrefixElement get prefix => _wrappedImport.prefix;
 
   @override
-  bool get isAlwaysThrows => _wrappedImport.isAlwaysThrows;
-
-  @override
-  bool get isVisibleForTesting => _wrappedImport.isVisibleForTesting;
-
-  @override
   int get prefixOffset => _wrappedImport.prefixOffset;
 }
diff --git a/angular_analyzer_plugin/lib/src/facade/exports_library_element.dart b/angular_analyzer_plugin/lib/src/facade/exports_library_element.dart
index eaf1a3a..53c1b58 100644
--- a/angular_analyzer_plugin/lib/src/facade/exports_library_element.dart
+++ b/angular_analyzer_plugin/lib/src/facade/exports_library_element.dart
@@ -49,31 +49,61 @@
   int get id => _wrappedLib.id;
 
   @override
-  bool get isDeprecated => _wrappedLib.isDeprecated;
-
-  @override
-  bool get isFactory => _wrappedLib.isFactory;
-
-  @override
-  bool get isJS => false;
-
-  @override
-  bool get isOverride => _wrappedLib.isOverride;
-
-  @override
   bool get isPrivate => _wrappedLib.isPrivate;
 
   @override
-  bool get isProtected => _wrappedLib.isProtected;
-
-  @override
   bool get isPublic => _wrappedLib.isPublic;
 
   @override
-  bool get isRequired => _wrappedLib.isRequired;
+  bool get isSynthetic => _wrappedLib.isSynthetic;
 
   @override
-  bool get isSynthetic => _wrappedLib.isSynthetic;
+  bool get isDeprecated => hasDeprecated;
+
+  @override
+  bool get isFactory => hasFactory;
+
+  @override
+  bool get isJS => false;
+
+  @override
+  bool get isOverride => hasOverride;
+
+  @override
+  bool get isProtected => hasProtected;
+
+  @override
+  bool get isRequired => hasRequired;
+
+  @override
+  bool get isAlwaysThrows => hasAlwaysThrows;
+
+  @override
+  bool get isVisibleForTesting => hasVisibleForTesting;
+
+  @override
+  bool get hasDeprecated => _wrappedLib.hasDeprecated;
+
+  @override
+  bool get hasFactory => _wrappedLib.hasFactory;
+
+  @override
+  bool get hasJS => false;
+
+  @override
+  bool get hasOverride => _wrappedLib.hasOverride;
+
+  @override
+  bool get hasProtected => _wrappedLib.hasProtected;
+
+  @override
+  bool get hasRequired => _wrappedLib.hasRequired;
+
+  @override
+  bool get hasAlwaysThrows => _wrappedLib.hasAlwaysThrows;
+
+  @override
+  bool get hasVisibleForTesting => _wrappedLib.hasVisibleForTesting;
 
   @override
   LibraryElement get library => this;
diff --git a/angular_analyzer_plugin/lib/src/resolver.dart b/angular_analyzer_plugin/lib/src/resolver.dart
index 9ca1752..c951acb 100644
--- a/angular_analyzer_plugin/lib/src/resolver.dart
+++ b/angular_analyzer_plugin/lib/src/resolver.dart
@@ -1753,10 +1753,24 @@
       _reportUnacceptableNode(exp, "Named arguments");
 }
 
+/// Workaround for "This mixin application is invalid because all of the
+/// constructors in the base class 'ErrorVerifier' have optional parameters."
+/// in the definition of [AngularErrorVerifier].
+///
+/// See https://github.com/dart-lang/sdk/issues/15101 for details
+class _IntermediateErrorVerifier extends ErrorVerifier {
+  _IntermediateErrorVerifier(
+    ErrorReporter errorReporter,
+    LibraryElement library,
+    TypeProvider typeProvider,
+    InheritanceManager inheritanceManager,
+  ) : super(errorReporter, library, typeProvider, inheritanceManager, false);
+}
+
 /// Override the standard [ErrorVerifier] class to report unacceptable nodes,
 /// while suppressing secondary errors that would have been raised by
 /// [ErrorVerifier] if we let it see the bogus definitions.
-class AngularErrorVerifier extends ErrorVerifier
+class AngularErrorVerifier extends _IntermediateErrorVerifier
     with ReportUnacceptableNodesMixin {
   final bool acceptAssignment;
 
@@ -1770,7 +1784,7 @@
       {@required this.acceptAssignment})
       : errorReporter = errorReporter,
         typeProvider = typeProvider,
-        super(errorReporter, library, typeProvider, inheritanceManager, false);
+        super(errorReporter, library, typeProvider, inheritanceManager);
 
   @override
   void visitFunctionExpression(FunctionExpression exp) {