Index: pkg/dev_compiler/lib/src/compiler/reify_coercions.dart |
diff --git a/pkg/dev_compiler/lib/src/compiler/reify_coercions.dart b/pkg/dev_compiler/lib/src/compiler/reify_coercions.dart |
index 595d540c30cb8ebf13f2485d91236cd8f93369ea..bf0b57110a7660b8169ae552b718ce7155328234 100644 |
--- a/pkg/dev_compiler/lib/src/compiler/reify_coercions.dart |
+++ b/pkg/dev_compiler/lib/src/compiler/reify_coercions.dart |
@@ -32,10 +32,11 @@ class CoercionReifier extends analyzer.GeneralizingAstVisitor<Object> { |
return units.map(cr.visitCompilationUnit).toList(growable: false); |
} |
- /// Returns true if the `as` [node] was created by this class. |
+ /// True if the `as` [node] is a required runtime check for soundness. |
// TODO(sra): Find a better way to recognize reified coercion, since we |
// can't set the isSynthetic attribute. |
- static bool isImplicitCast(AsExpression node) => node.asOperator.offset == 0; |
+ static bool isRequiredForSoundness(AsExpression node) => |
+ node.asOperator.offset == 0; |
/// Creates an implicit cast for expression [e] to [toType]. |
static Expression castExpression(Expression e, DartType toType) { |
@@ -132,9 +133,17 @@ class _TreeCloner extends analyzer.AstCloner { |
if (clone is Expression) { |
ast_properties.setImplicitCast( |
clone, ast_properties.getImplicitCast(node)); |
+ ast_properties.setImplicitOperationCast( |
+ clone, ast_properties.getImplicitOperationCast(node)); |
ast_properties.setIsDynamicInvoke( |
clone, ast_properties.isDynamicInvoke(node)); |
} |
+ if (clone is ClassDeclaration) { |
+ ast_properties.setClassCovariantParameters( |
+ clone, ast_properties.getClassCovariantParameters(node)); |
+ ast_properties.setSuperclassCovariantParameters( |
+ clone, ast_properties.getSuperclassCovariantParameters(node)); |
+ } |
} |
@override |