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

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

Issue 2012163003: Fix several element properties in serialization. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt Created 4 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/member_impl.dart
diff --git a/pkg/compiler/lib/src/resolution/member_impl.dart b/pkg/compiler/lib/src/resolution/member_impl.dart
index 7597d366e6bc1adf846f1011c26b57d7d9174aab..8c4eb1c8c7ae1e706c398766eabd49d5b0a54c36 100644
--- a/pkg/compiler/lib/src/resolution/member_impl.dart
+++ b/pkg/compiler/lib/src/resolution/member_impl.dart
@@ -138,13 +138,17 @@ class InheritedMember implements DeclaredMember {
}
DeclaredMember inheritFrom(InterfaceType newInstance) {
- assert(() {
+ assert(invariant(declaration.element, () {
// 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.";
+ }));
return _newInheritedMember(newInstance);
}
@@ -169,7 +173,7 @@ class InheritedMember implements DeclaredMember {
String toString() {
StringBuffer sb = new StringBuffer();
- printOn(sb, instance);
+ printOn(sb, type);
return sb.toString();
}
}
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | pkg/compiler/lib/src/serialization/element_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698