Index: pkg/compiler/lib/src/cps_ir/remove_refinements.dart |
diff --git a/pkg/compiler/lib/src/cps_ir/remove_refinements.dart b/pkg/compiler/lib/src/cps_ir/remove_refinements.dart |
index 98f1c17a8867dd072bc56f7d1d30d89566f965a7..2d49c95602fa8a15541c90790d9de0ad6f4675a3 100644 |
--- a/pkg/compiler/lib/src/cps_ir/remove_refinements.dart |
+++ b/pkg/compiler/lib/src/cps_ir/remove_refinements.dart |
@@ -23,7 +23,11 @@ class RemoveRefinements extends TrampolineRecursiveVisitor implements Pass { |
Expression next = node.body; |
if (node.primitive is Refinement) { |
Refinement refinement = node.primitive; |
- refinement.value.definition.substituteFor(refinement); |
+ Primitive value = refinement.value.definition; |
+ if (refinement.hint != null && value.hint == null) { |
+ value.hint = refinement.hint; |
+ } |
+ value.substituteFor(refinement); |
refinement.destroy(); |
node.remove(); |
} |