diff --git a/lib/runtime/dart/_internal.js b/lib/runtime/dart/_internal.js index 4823c447..4eeaed05 100644 --- a/lib/runtime/dart/_internal.js +++ b/lib/runtime/dart/_internal.js @@ -616,7 +616,7 @@ dart_library.library('dart/_internal', null, /* Imports */[ super.IterableBase(); } get iterator() { - return new (ExpandIterator$(S, T))(this[_iterable][dartx.iterator], dart.as(this[_f], __CastType0$(S, T))); + return new (ExpandIterator$(S, T))(this[_iterable][dartx.iterator], dart.as(this[_f], __CastType0)); } } dart.setSignature(ExpandIterable, { @@ -1309,7 +1309,7 @@ dart_library.library('dart/_internal', null, /* Imports */[ } where(iterable, f) { dart.as(f, dart.functionType(core.bool, [dart.dynamic])); - return new (WhereIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(f, __CastType2$(T))); + return new (WhereIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(f, __CastType2)); } static map(iterable, f) { dart.as(f, dart.functionType(dart.dynamic, [dart.dynamic])); diff --git a/lib/runtime/dart/async.js b/lib/runtime/dart/async.js index 2cd147ab..ae80ff46 100644 --- a/lib/runtime/dart/async.js +++ b/lib/runtime/dart/async.js @@ -911,7 +911,7 @@ dart_library.library('dart/async', null, /* Imports */[ onData(handleData) { dart.as(handleData, dart.functionType(dart.void, [T])); if (handleData == null) - handleData = dart.as(_nullDataHandler, __CastType20$(T)); + handleData = dart.as(_nullDataHandler, __CastType20); this[_onData] = dart.as(this[_zone].registerUnaryCallback(handleData), _DataHandler$(T)); } onError(handleError) { @@ -1573,7 +1573,7 @@ dart_library.library('dart/async', null, /* Imports */[ this[_forEachListener](dart.as(dart.fn(subscription => { dart.as(subscription, _BroadcastSubscription$(T)); subscription[_close](); - }, dart.dynamic, [_BroadcastSubscription$(T)]), __CastType2$(T))); + }, dart.dynamic, [_BroadcastSubscription$(T)]), __CastType2)); } else { dart.assert(this[_doneFuture] != null); dart.assert(this[_doneFuture][_mayComplete]); @@ -2258,7 +2258,7 @@ dart_library.library('dart/async', null, /* Imports */[ dart.as(f, dart.functionType(dart.dynamic, [T])); let result = new (_Future$())(); if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { - f = dart.as(result[_zone].registerUnaryCallback(f), __CastType6$(T)); + f = dart.as(result[_zone].registerUnaryCallback(f), __CastType6); if (onError != null) { onError = _registerErrorHandler(onError, result[_zone]); } @@ -3335,12 +3335,12 @@ dart_library.library('dart/async', null, /* Imports */[ return null; } } - class _NoCallbackAsyncStreamController extends dart.mixin(_StreamController$(dart.dynamic), _AsyncStreamControllerDispatch$(dart.dynamic), _NoCallbacks) { + class _NoCallbackAsyncStreamController extends dart.mixin(_StreamController, _AsyncStreamControllerDispatch, _NoCallbacks) { _NoCallbackAsyncStreamController() { super._StreamController(...arguments); } } - class _NoCallbackSyncStreamController extends dart.mixin(_StreamController$(dart.dynamic), _SyncStreamControllerDispatch$(dart.dynamic), _NoCallbacks) { + class _NoCallbackSyncStreamController extends dart.mixin(_StreamController, _SyncStreamControllerDispatch, _NoCallbacks) { _NoCallbackSyncStreamController() { super._StreamController(...arguments); } @@ -4834,9 +4834,9 @@ dart_library.library('dart/async', null, /* Imports */[ super._StreamSinkTransformer(dart.as(dart.fn(outputSink => { dart.as(outputSink, EventSink$(T)); if (handleData == null) - handleData = dart.as(_StreamHandlerTransformer$()._defaultHandleData, __CastType27$(S, T)); + handleData = dart.as(_StreamHandlerTransformer$()._defaultHandleData, __CastType27); if (handleError == null) - handleError = dart.as(_StreamHandlerTransformer$()._defaultHandleError, __CastType30$(T)); + handleError = dart.as(_StreamHandlerTransformer$()._defaultHandleError, __CastType30); if (handleDone == null) handleDone = _StreamHandlerTransformer$()._defaultHandleDone; return new (_HandlerEventSink$(S, T))(handleData, handleError, handleDone, outputSink); diff --git a/lib/runtime/dart/js.js b/lib/runtime/dart/js.js index 02b9eb17..c6736f8c 100644 --- a/lib/runtime/dart/js.js +++ b/lib/runtime/dart/js.js @@ -175,7 +175,7 @@ dart_library.library('dart/js', null, /* Imports */[ from(other) { super._fromJs((() => { let _ = []; - _[dartx.addAll](other[dartx.map](dart.as(_convertToJS, __CastType0$(E)))); + _[dartx.addAll](other[dartx.map](dart.as(_convertToJS, __CastType0))); return _; })()); } diff --git a/pubspec.yaml b/pubspec.yaml index 24da769b..e0d81ea5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,7 +9,9 @@ author: Dart Dev Compiler team homepage: https://github.com/dart-lang/dev_compiler dependencies: - analyzer: ^0.26.1+17 + # Pinning a specific version of the analyzer as we don't support newer ones yet + # (https://github.com/dart-lang/dev_compiler/issues/393). + analyzer: 0.26.2+1 args: ^0.13.0 cli_util: ^0.0.1 crypto: ^0.9.0 diff --git a/test/codegen/expect/collection/priority_queue.js b/test/codegen/expect/collection/priority_queue.js index 6a14e343..22ff381d 100644 --- a/test/codegen/expect/collection/priority_queue.js +++ b/test/codegen/expect/collection/priority_queue.js @@ -97,7 +97,7 @@ dart_library.library('collection/priority_queue', null, /* Imports */[ let list = core.List$(E).new(); list[dartx.length] = this[_length]; list[dartx.setRange](0, this[_length], this[_queue]); - list[dartx.sort](dart.as(this.comparison, __CastType0$(E))); + list[dartx.sort](dart.as(this.comparison, __CastType0)); return list; } toSet() { diff --git a/test/codegen/expect/collection/wrappers.js b/test/codegen/expect/collection/wrappers.js index 49c94d63..32ecc5a3 100644 --- a/test/codegen/expect/collection/wrappers.js +++ b/test/codegen/expect/collection/wrappers.js @@ -697,7 +697,7 @@ dart_library.library('collection/wrappers', null, /* Imports */[ this[_baseMap].putIfAbsent(key, dart.as(dart.fn(() => { result = true; return value; - }), __CastType0$(V))); + }), __CastType0)); return result; } addAll(elements) { diff --git a/tool/sdk_expected_errors.txt b/tool/sdk_expected_errors.txt index 994b4440..ed241526 100644 --- a/tool/sdk_expected_errors.txt +++ b/tool/sdk_expected_errors.txt @@ -9,12 +9,6 @@ severe: [AnalyzerMessage] 'const' variables must be constant value (dart:_utils, severe: [AnalyzerMessage] 'const' variables must be constant value (dart:_utils, line 23, col 25) severe: [AnalyzerMessage] The redirected constructor '((Stream, bool) → StreamSubscription) → _StreamSubscriptionTransformer' has incompatible parameters with '((Stream, bool) → StreamSubscription) → StreamTransformer' (dart:async/stream.dart, line 1571, col 9) severe: [AnalyzerMessage] The redirected constructor '({handleData: (dynamic, EventSink) → void, handleError: (Object, StackTrace, EventSink) → void, handleDone: (EventSink) → void}) → _StreamHandlerTransformer' has incompatible parameters with '({handleData: (S, EventSink) → void, handleError: (Object, StackTrace, EventSink) → void, handleDone: (EventSink) → void}) → StreamTransformer' (dart:async/stream.dart, line 1588, col 13) -severe: [AnalyzerMessage] The type '_NoCallbackSyncStreamController' is declared with 0 type parameters, but 1 type arguments were given (dart:async/stream_controller.dart, line 84, col 17) -severe: [AnalyzerMessage] The type '_NoCallbackAsyncStreamController' is declared with 0 type parameters, but 1 type arguments were given (dart:async/stream_controller.dart, line 85, col 17) -severe: [AnalyzerMessage] The name 'T' is not a type and cannot be used as a parameterized type (dart:async/stream_controller.dart, line 653, col 69) -severe: [AnalyzerMessage] The name 'T' is not a type and cannot be used as a parameterized type (dart:async/stream_controller.dart, line 654, col 46) -severe: [AnalyzerMessage] The name 'T' is not a type and cannot be used as a parameterized type (dart:async/stream_controller.dart, line 656, col 68) -severe: [AnalyzerMessage] The name 'T' is not a type and cannot be used as a parameterized type (dart:async/stream_controller.dart, line 657, col 45) severe: [AnalyzerMessage] The redirected constructor '((List) → void) → _SimpleCallbackSink' has incompatible parameters with '((List) → void) → ChunkedConversionSink' (dart:convert/chunked_conversion.dart, line 23, col 45) severe: [AnalyzerMessage] The redirected constructor '(Iterable) → LinkedHashSet' has incompatible parameters with '(Iterable) → Set' (dart:core/set.dart, line 75, col 41) warning: [DownCastComposite] doneHandlers (dynamic) will need runtime check to cast to type Iterable (dart:_isolate_helper, line 574, col 29) @@ -77,7 +71,7 @@ warning: [DownCastComposite] timeout2 (Function) will need runtime check to cast warning: [DownCastComposite] zone.registerUnaryCallback(onTimeout) ((dynamic) → dynamic) will need runtime check to cast to type (EventSink) → void (dart:async/stream.dart, line 1246, col 21) warning: [DownCastComposite] timeout2 (Function) will need runtime check to cast to type () → void (dart:async/stream.dart, line 1257, col 43) warning: [DownCastComposite] timeout2 (Function) will need runtime check to cast to type () → void (dart:async/stream.dart, line 1276, col 53) -warning: [DownCastComposite] sync ? new _NoCallbackSyncStreamController() : new _NoCallbackAsyncStreamController() (_StreamController) will need runtime check to cast to type StreamController (dart:async/stream_controller.dart, line 83, col 14) +warning: [DownCastComposite] sync ? new _NoCallbackSyncStreamController() : new _NoCallbackAsyncStreamController() (_StreamController) will need runtime check to cast to type StreamController (dart:async/stream_controller.dart, line 83, col 14) warning: [DownCastComposite] subscription (_ControllerSubscription) will need runtime check to cast to type StreamSubscription (dart:async/stream_controller.dart, line 516, col 12) warning: [DownCastComposite] controller (_StreamController) will need runtime check to cast to type _EventSink (dart:async/stream_controller.dart, line 798, col 15) warning: [DownCastComposite] _nullDataHandler ((dynamic) → void) will need runtime check to cast to type (T) → void (dart:async/stream_impl.dart, line 153, col 42)