| Index: sdk/lib/_internal/js_runtime/lib/js_mirrors.dart
|
| diff --git a/sdk/lib/_internal/js_runtime/lib/js_mirrors.dart b/sdk/lib/_internal/js_runtime/lib/js_mirrors.dart
|
| index 36924db217846fc3f13ca595865a730687b85e27..a1aa7b49f8124c56ddb9db7a6b3bb689be2bcdf6 100644
|
| --- a/sdk/lib/_internal/js_runtime/lib/js_mirrors.dart
|
| +++ b/sdk/lib/_internal/js_runtime/lib/js_mirrors.dart
|
| @@ -35,6 +35,7 @@ import 'dart:_js_helper'
|
| BoundClosure,
|
| CachedInvocation,
|
| Closure,
|
| + isVoidType,
|
| JSInvocationMirror,
|
| JsCache,
|
| Primitives,
|
| @@ -2649,11 +2650,6 @@ class JsFunctionTypeMirror extends BrokenClassMirror
|
| JS_GET_NAME(JsGetName.FUNCTION_TYPE_RETURN_TYPE_TAG));
|
| }
|
|
|
| - bool get _isVoid {
|
| - return JS('bool', '!!#[#]', _typeData,
|
| - JS_GET_NAME(JsGetName.FUNCTION_TYPE_VOID_RETURN_TAG));
|
| - }
|
| -
|
| bool get _hasArguments {
|
| return JS(
|
| 'bool',
|
| @@ -2698,7 +2694,6 @@ class JsFunctionTypeMirror extends BrokenClassMirror
|
|
|
| TypeMirror get returnType {
|
| if (_cachedReturnType != null) return _cachedReturnType;
|
| - if (_isVoid) return _cachedReturnType = JsMirrorSystem._voidType;
|
| if (!_hasReturnType) return _cachedReturnType = JsMirrorSystem._dynamicType;
|
| return _cachedReturnType =
|
| typeMirrorFromRuntimeTypeRepresentation(owner, _returnType);
|
| @@ -2770,9 +2765,7 @@ class JsFunctionTypeMirror extends BrokenClassMirror
|
| s += '}';
|
| }
|
| s += ') -> ';
|
| - if (_isVoid) {
|
| - s += 'void';
|
| - } else if (_hasReturnType) {
|
| + if (_hasReturnType) {
|
| s += _unmangleIfPreserved(runtimeTypeToString(_returnType));
|
| } else {
|
| s += 'dynamic';
|
| @@ -2807,6 +2800,10 @@ TypeMirror typeMirrorFromRuntimeTypeRepresentation(
|
| return JsMirrorSystem._dynamicType;
|
| }
|
|
|
| + if (isVoidType(type)) {
|
| + return JsMirrorSystem._voidType;
|
| + }
|
| +
|
| ClassMirror ownerClass;
|
| DeclarationMirror context = owner;
|
| while (context != null) {
|
|
|