Description
I added this test case to test/specs/code/expression_test.dart
around line 470:
test('should emit an explicit cast in an arrow function', () {
expect(
refer('callback').call([
Method((b) => b..body = refer('foo').asA(refer('String')).code).closure
]),
equalsDart('callback(() => ( foo as String ))'),
);
});
The test fails because the output is actually callback(() { ( foo as String )...
which
a. does not have the expected =>
, and
b. does not include a semi-colon, so the output is not even parseable Dart.