| 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 94231b01967bd41bff101e62f9e66390868c7430..25a83f73a7c760e0e0b15ec27eff2797ef07350a 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,
|
| @@ -2676,11 +2677,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',
|
| @@ -2725,7 +2721,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);
|
| @@ -2801,9 +2796,7 @@ class JsFunctionTypeMirror extends BrokenClassMirror
|
| s += '}';
|
| }
|
| s += ') -> ';
|
| - if (_isVoid) {
|
| - s += 'void';
|
| - } else if (_hasReturnType) {
|
| + if (_hasReturnType) {
|
| s += _unmangleIfPreserved(runtimeTypeToString(_returnType));
|
| } else {
|
| s += 'dynamic';
|
| @@ -2838,6 +2831,10 @@ TypeMirror typeMirrorFromRuntimeTypeRepresentation(
|
| return JsMirrorSystem._dynamicType;
|
| }
|
|
|
| + if (isVoidType(type)) {
|
| + return JsMirrorSystem._voidType;
|
| + }
|
| +
|
| ClassMirror ownerClass;
|
| DeclarationMirror context = owner;
|
| while (context != null) {
|
|
|