mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[dart2js] Migrate js patch file to NNBD.
Change-Id: I51296bd310c5ce902483253656acf07263d9244b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135486 Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
parent
0d34bf5571
commit
c894118574
|
@ -13,7 +13,8 @@ ERROR|COMPILE_TIME_ERROR|INVALID_OVERRIDE|lib/_internal/js_runtime/lib/native_ty
|
|||
ERROR|COMPILE_TIME_ERROR|INVALID_OVERRIDE|lib/async/async.dart|5764|17|2|'_ControllerStream.==' ('bool Function(Object)') isn't a valid override of 'Object.==' ('bool* Function(dynamic)*').
|
||||
ERROR|COMPILE_TIME_ERROR|INVALID_OVERRIDE|lib/internal/internal.dart|2657|17|2|'Symbol.==' ('bool Function(Object)') isn't a valid override of 'Object.==' ('bool* Function(dynamic)*').
|
||||
ERROR|COMPILE_TIME_ERROR|INVALID_OVERRIDE|lib/internal/internal.dart|2657|17|2|'Symbol.==' ('bool Function(Object)') isn't a valid override of 'Symbol.==' ('bool* Function(dynamic)*').
|
||||
ERROR|COMPILE_TIME_ERROR|INVALID_OVERRIDE|lib/js/js.dart|351|17|3|'JsArray.[]=' ('void Function(dynamic, E)') isn't a valid override of 'JsObject.[]=' ('void Function(dynamic, dynamic)').
|
||||
ERROR|COMPILE_TIME_ERROR|INVALID_OVERRIDE|lib/js/js.dart|221|17|2|'JsObject.==' ('bool Function(Object)') isn't a valid override of 'Object.==' ('bool* Function(dynamic)*').
|
||||
ERROR|COMPILE_TIME_ERROR|INVALID_OVERRIDE|lib/js/js.dart|329|7|7|'JsObject.==' ('bool Function(Object)') isn't a valid override of 'Object.==' ('bool* Function(dynamic)*').
|
||||
ERROR|COMPILE_TIME_ERROR|INVALID_OVERRIDE|lib/math/math.dart|260|17|2|'Point.==' ('bool Function(Object)') isn't a valid override of 'Object.==' ('bool* Function(dynamic)*').
|
||||
ERROR|COMPILE_TIME_ERROR|INVALID_OVERRIDE|lib/math/math.dart|399|17|2|'_RectangleBase.==' ('bool Function(Object)') isn't a valid override of 'Object.==' ('bool* Function(dynamic)*').
|
||||
ERROR|STATIC_TYPE_WARNING|RETURN_OF_INVALID_TYPE_FROM_CLOSURE|lib/collection/collection.dart|4836|53|10|The return type 'V?' isn't a 'V', as required by the closure's context.
|
||||
|
@ -30,5 +31,6 @@ ERROR|STATIC_WARNING|NEW_WITH_UNDEFINED_CONSTRUCTOR|lib/internal/internal.dart|1
|
|||
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|1463|39|5|The left operand can't be null, so the right operand is never executed.
|
||||
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|8345|60|5|The left operand can't be null, so the right operand is never executed.
|
||||
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|9272|54|5|The left operand can't be null, so the right operand is never executed.
|
||||
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/developer/developer.dart|315|25|23|The left operand can't be null, so the right operand is never executed.
|
||||
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/html/dart2js/html_dart2js.dart|4075|25|2|The left operand can't be null, so the right operand is never executed.
|
||||
WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/io/io.dart|9167|16|1|The left operand can't be null, so the right operand is never executed.
|
||||
|
|
|
@ -278,7 +278,7 @@ class JsArray<E> extends JsObject with ListMixin<E> {
|
|||
}
|
||||
|
||||
@patch
|
||||
void operator []=(Object index, E value) {
|
||||
void operator []=(Object index, Object? value) {
|
||||
if (index is int) {
|
||||
_checkIndex(index);
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ class JsArray<E> extends JsObject with ListMixin<E> {
|
|||
}
|
||||
|
||||
@patch
|
||||
void sort([int compare(E a, E b)]) {
|
||||
void sort([int compare(E a, E b)?]) {
|
||||
// Note: arr.sort(null) is a type error in FF
|
||||
callMethod('sort', compare == null ? [] : [compare]);
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ bool _hasOwnProperty(o, String name) {
|
|||
|
||||
bool _isExtensible(o) => JS('bool', 'Object.isExtensible(#)', o);
|
||||
|
||||
Object _getOwnProperty(o, String name) {
|
||||
Object? _getOwnProperty(o, String name) {
|
||||
if (_hasOwnProperty(o, name)) {
|
||||
return JS('', '#[#]', o, name);
|
||||
}
|
||||
|
@ -434,7 +434,7 @@ Object? _convertToJS(Object? o) {
|
|||
o, _JS_OBJECT_PROPERTY_NAME, (o) => JS('', 'new #(#)', ctor, o));
|
||||
}
|
||||
|
||||
Object _getJsProxy(o, String propertyName, createProxy(o)) {
|
||||
Object? _getJsProxy(o, String propertyName, createProxy(o)) {
|
||||
var jsProxy = _getOwnProperty(o, propertyName);
|
||||
if (jsProxy == null) {
|
||||
jsProxy = createProxy(o);
|
||||
|
|
|
@ -46,8 +46,8 @@
|
|||
"supported": false
|
||||
},
|
||||
"js": {
|
||||
"uri": "../../sdk/lib/js/js.dart",
|
||||
"patches": "../../sdk/lib/_internal/js_runtime/lib/js_patch.dart"
|
||||
"uri": "js/js.dart",
|
||||
"patches": "_internal/js_runtime/lib/js_patch.dart"
|
||||
},
|
||||
"_js": {
|
||||
"uri": "js/_js.dart",
|
||||
|
@ -87,7 +87,7 @@
|
|||
"uri": "_internal/js_runtime/lib/js_helper.dart"
|
||||
},
|
||||
"_rti": {
|
||||
"uri": "../../sdk/lib/_internal/js_runtime/lib/rti.dart"
|
||||
"uri": "_internal/js_runtime/lib/rti.dart"
|
||||
},
|
||||
"_interceptors": {
|
||||
"uri": "_internal/js_runtime/lib/interceptors.dart"
|
||||
|
|
Loading…
Reference in a new issue