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

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

Issue 2905463003: 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/registry.dart
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index cc9db2c00894e5e5bd57d51d3fa77e9682bc95e1..26b592c0e9a1b0a9096f48b238469ac85b1d524a 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -279,22 +279,22 @@ class ResolutionRegistry {
/// Register [node] to be the declaration of [target].
void defineTarget(Node node, JumpTarget target) {
- assert(invariant(node, node is Statement || node is SwitchCase,
- message: "Only statements and switch cases can define targets."));
+ assert(node is Statement || node is SwitchCase,
+ failedAt(node, "Only statements and switch cases can define targets."));
mapping.defineTarget(node, target);
}
/// Returns the [JumpTarget] defined by [node].
JumpTarget getTargetDefinition(Node node) {
- assert(invariant(node, node is Statement || node is SwitchCase,
- message: "Only statements and switch cases can define targets."));
+ assert(node is Statement || node is SwitchCase,
+ failedAt(node, "Only statements and switch cases can define targets."));
return mapping.getTargetDefinition(node);
}
/// Undefine the target of [node]. This is used to cleanup unused targets.
void undefineTarget(Node node) {
- assert(invariant(node, node is Statement || node is SwitchCase,
- message: "Only statements and switch cases can define targets."));
+ assert(node is Statement || node is SwitchCase,
+ failedAt(node, "Only statements and switch cases can define targets."));
mapping.undefineTarget(node);
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698