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

Unified Diff: pkg/analyzer/lib/src/generated/error_verifier.dart

Issue 724133003: Improve error reporting when a mixin application is invalid. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/analyzer/lib/src/generated/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 21aadca68e5259dfdcc6522001b1cfd6238471c7..4ff01d037398ff74d51b9ed7bc8cdc53e77fd05e 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -3996,6 +3996,10 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
* See [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT].
*/
bool _checkForNoDefaultSuperConstructorImplicit(ClassDeclaration node) {
+ // do nothing if mixin errors have already been reported for this class.
+ if (_enclosingClass.mixinErrorsReported) {
+ return false;
+ }
// do nothing if there is explicit constructor
List<ConstructorElement> constructors = _enclosingClass.constructors;
if (!constructors[0].isSynthetic) {
@@ -4835,6 +4839,13 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
* [StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT].
*/
bool _checkForUndefinedConstructorInInitializerImplicit(ConstructorDeclaration node) {
+ if (_enclosingClass == null) {
+ return false;
+ }
+ // do nothing if mixin errors have already been reported for this class.
+ if (_enclosingClass.mixinErrorsReported) {
+ return false;
+ }
//
// Ignore if the constructor is not generative.
//
@@ -4853,9 +4864,6 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
//
// Check to see whether the superclass has a non-factory unnamed constructor.
//
- if (_enclosingClass == null) {
- return false;
- }
InterfaceType superType = _enclosingClass.supertype;
if (superType == null) {
return false;

Powered by Google App Engine
This is Rietveld 408576698