[dartdevc] Fix metalet regression
Hitting this when compiling the analyzer with DDC. I thought this was exercised
when training the DDC snapshot (it compiles itself), but it seems not.
Lost the assignment here on the recent implicit cast removal.
Change-Id: Id1a74999c75b2a36071bac3692c2022e7ad7eefe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103482
Commit-Queue: Vijay Menon <vsm@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Vijay Menon <vsm@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
diff --git a/pkg/dev_compiler/lib/src/compiler/js_metalet.dart b/pkg/dev_compiler/lib/src/compiler/js_metalet.dart
index c258e08..94f1c2edb 100644
--- a/pkg/dev_compiler/lib/src/compiler/js_metalet.dart
+++ b/pkg/dev_compiler/lib/src/compiler/js_metalet.dart
@@ -113,7 +113,7 @@
var block = toReturn();
var s = block.statements;
if (s.length == 1 && s.first is Return) {
- return (s.first as Return).value;
+ return _expression = (s.first as Return).value;
}
// Wrap it in an immediately called function to get in expression context.
return _expression = _toInvokedFunction(block);