| Index: pkg/dev_compiler/lib/src/compiler/code_generator.dart
|
| diff --git a/pkg/dev_compiler/lib/src/compiler/code_generator.dart b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
|
| index 783e7da39cf254546081c1448d3c88dbd217a656..9116b78aab410a285024a98f8064a8df3d73b532 100644
|
| --- a/pkg/dev_compiler/lib/src/compiler/code_generator.dart
|
| +++ b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
|
| @@ -2179,13 +2179,13 @@ class CodeGenerator extends GeneralizingAstVisitor
|
| // TODO(jmesserly): various problems here, see:
|
| // https://github.com/dart-lang/dev_compiler/issues/116
|
| var paramType = param.element.type;
|
| - if (node is MethodDeclaration && _unsoundCovariant(paramType, true)) {
|
| + if (node is MethodDeclaration &&
|
| + (param.element.isCovariant || _unsoundCovariant(paramType, true)) &&
|
| + !_inWhitelistCode(node)) {
|
| var castType = _emitType(paramType,
|
| nameType: options.nameTypeTests || options.hoistTypeTests,
|
| hoistType: options.hoistTypeTests);
|
| - if (!_inWhitelistCode(node)) {
|
| - body.add(js.statement('#._check(#);', [castType, jsParam]));
|
| - }
|
| + body.add(js.statement('#._check(#);', [castType, jsParam]));
|
| }
|
| }
|
| return body.isEmpty ? null : _statement(body);
|
|
|