| Index: lib/src/compiler/reify_coercions.dart
|
| diff --git a/lib/src/compiler/reify_coercions.dart b/lib/src/compiler/reify_coercions.dart
|
| index 59f97147bdcb416612f104204e867880b6aa2cf6..87ea5e00003851ba9b1cf15a86ea8f7ec027405a 100644
|
| --- a/lib/src/compiler/reify_coercions.dart
|
| +++ b/lib/src/compiler/reify_coercions.dart
|
| @@ -4,15 +4,17 @@
|
|
|
| import 'package:analyzer/analyzer.dart' as analyzer;
|
| import 'package:analyzer/dart/ast/ast.dart';
|
| -import 'package:analyzer/dart/element/type.dart';
|
| +import 'package:analyzer/dart/element/type.dart' show DartType;
|
| import 'package:analyzer/src/dart/ast/ast.dart' show FunctionBodyImpl;
|
| import 'package:analyzer/src/dart/ast/utilities.dart' show NodeReplacer;
|
| import 'package:analyzer/src/dart/element/type.dart' show DynamicTypeImpl;
|
| import 'package:analyzer/src/generated/parser.dart' show ResolutionCopier;
|
| -import 'package:analyzer/src/task/strong/info.dart';
|
| +import 'package:analyzer/src/task/strong/info.dart'
|
| + show CoercionInfo, DownCast, DynamicInvoke;
|
| import 'package:logging/logging.dart' as logger;
|
|
|
| -import 'ast_builder.dart';
|
| +import 'ast_builder.dart' show AstBuilder, RawAstBuilder;
|
| +import 'element_helpers.dart' show isInlineJS;
|
|
|
| final _log = new logger.Logger('dev_compiler.reify_coercions');
|
|
|
| @@ -90,6 +92,10 @@ class CoercionReifier extends analyzer.GeneralizingAstVisitor<Object> {
|
| Expression inner = coerceExpression(e.expression, node);
|
| return new NamedExpression(e.name, inner);
|
| }
|
| + if (e is MethodInvocation && isInlineJS(e.methodName.staticElement)) {
|
| + // Inline JS code should not need casts.
|
| + return e;
|
| + }
|
| return _castExpression(e, node.convertedType);
|
| }
|
|
|
|
|