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

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

Issue 2917653002: Use failedAt in more places (Closed)
Patch Set: Created 3 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/signatures.dart
diff --git a/pkg/compiler/lib/src/resolution/signatures.dart b/pkg/compiler/lib/src/resolution/signatures.dart
index 9608b3f664a8e3f09ee7b06ec3d7ef253031b5f6..33dbfd8a1a312c5471201ba18f4c627f1625f993 100644
--- a/pkg/compiler/lib/src/resolution/signatures.dart
+++ b/pkg/compiler/lib/src/resolution/signatures.dart
@@ -148,8 +148,8 @@ class SignatureResolver extends MappingVisitor<FormalElementX> {
computeInlineFunctionType(
link.head.asSend().selector.asFunctionExpression());
} else {
- assert(invariant(currentDefinitions,
- link.head.asIdentifier() != null || link.head.asSend() != null));
+ assert(link.head.asIdentifier() != null || link.head.asSend() != null,
+ failedAt(currentDefinitions));
if (fieldElement != null) {
element.typeCache = fieldElement.computeType(resolution);
} else {
@@ -365,7 +365,7 @@ class SignatureResolver extends MappingVisitor<FormalElementX> {
// reported. In the case of parse errors, it is possible that there
// are formal parameters, but something else in the method failed to
// parse. So we suppress the message about missing formals.
- assert(invariant(element, reporter.hasReportedError));
+ assert(reporter.hasReportedError, failedAt(element));
} else {
reporter.reportErrorMessage(element, MessageKind.MISSING_FORMALS);
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_members.dart ('k') | pkg/compiler/lib/src/resolution/tree_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698