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

Unified Diff: pkg/compiler/lib/src/resolution/member_impl.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/constructors.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/member_impl.dart
diff --git a/pkg/compiler/lib/src/resolution/member_impl.dart b/pkg/compiler/lib/src/resolution/member_impl.dart
index 70f2a7aa36f095dcdd9af2db2d38fe9c2f6cbfba..bb2bab7a3edcf259d5e67050ad58fc6ea70a4221 100644
--- a/pkg/compiler/lib/src/resolution/member_impl.dart
+++ b/pkg/compiler/lib/src/resolution/member_impl.dart
@@ -143,17 +143,18 @@ class InheritedMember implements DeclaredMember {
}
DeclaredMember inheritFrom(ResolutionInterfaceType newInstance) {
- assert(invariant(declaration.element, () {
+ assert(() {
// Assert that if [instance] contains type variables, then these are
// defined in the declaration of [newInstance] and will therefore be
// substituted into the context of [newInstance] in the created member.
ClassElement contextClass = Types.getClassContext(instance);
return contextClass == null || contextClass == newInstance.element;
- }, message: () {
- return "Context mismatch: Context class "
- "${Types.getClassContext(instance)} from $instance does match "
- "the new instance $newInstance.";
- }));
+ },
+ failedAt(
+ declaration.element,
+ "Context mismatch: Context class "
+ "${Types.getClassContext(instance)} from $instance does match "
+ "the new instance $newInstance."));
return _newInheritedMember(newInstance);
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/constructors.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698