Index: pkg/compiler/lib/src/elements/modelx.dart |
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart |
index f48475e92c392f39b9bdd207b35f9ac437a54ac8..801f0f466b9d58570013f8281abce672f0ebf1a6 100644 |
--- a/pkg/compiler/lib/src/elements/modelx.dart |
+++ b/pkg/compiler/lib/src/elements/modelx.dart |
@@ -3572,10 +3572,8 @@ abstract class PatchMixin<E extends Element> implements Element { |
assert(this.origin == null, failedAt(this, "Origin element is a patch.")); |
assert(patch.origin == null, failedAt(patch, "Element is patched twice.")); |
assert(patch.patch == null, failedAt(patch, "Patch element is patched.")); |
- // ignore: INVALID_ASSIGNMENT |
- this.patch = patch; |
- // ignore: INVALID_ASSIGNMENT |
- patch.origin = this; |
+ this.patch = patch as E; |
+ patch.origin = this as E; |
} |
} |