| Index: lib/src/codegen/reify_coercions.dart
|
| diff --git a/lib/src/codegen/reify_coercions.dart b/lib/src/codegen/reify_coercions.dart
|
| index 36c965e3fbd46383b701590f411c41eb3a075a78..3aead3ebf0403b7717d9f31dffb2838f6308e54a 100644
|
| --- a/lib/src/codegen/reify_coercions.dart
|
| +++ b/lib/src/codegen/reify_coercions.dart
|
| @@ -12,6 +12,7 @@ import 'package:analyzer/src/generated/type_system.dart'
|
| import 'package:logging/logging.dart' as logger;
|
|
|
| import '../info.dart';
|
| +import '../utils.dart' show isInlineJS;
|
|
|
| import 'ast_builder.dart';
|
|
|
| @@ -168,6 +169,10 @@ class CoercionManager {
|
| Expression inner = coerceExpression(e.expression, c);
|
| return new NamedExpression(e.name, inner);
|
| }
|
| + if (e is MethodInvocation && isInlineJS(e.methodName.staticElement)) {
|
| + // Inline JS code should not need casts.
|
| + return e;
|
| + }
|
| if (c is Cast) return _castExpression(e, c);
|
| assert(c is Identity);
|
| return e;
|
|
|