Skip to content

Commit 7d32105

Browse files
committed
Pickup latest analyzer fixes
Note the new errors in sdk. Did we change something wrt overrides? [email protected] Review URL: https://codereview.chromium.org/1951263004 .
1 parent 155597e commit 7d32105

File tree

3 files changed

+42
-39
lines changed

3 files changed

+42
-39
lines changed

pkg/dev_compiler/lib/runtime/dart_sdk.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30809,7 +30809,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
3080930809
return `Rectangle (${this[dartx.left]}, ${this[dartx.top]}) ${this[dartx.width]} x ${this[dartx.height]}`;
3081030810
}
3081130811
['=='](other) {
30812-
if (!dart.is(other, math.Rectangle)) return false;
30812+
if (!dart.is(other, math.Rectangle$(core.num))) return false;
3081330813
return dart.equals(this[dartx.left], dart.dload(other, 'left')) && dart.equals(this[dartx.top], dart.dload(other, 'top')) && dart.equals(this[dartx.right], dart.dload(other, 'right')) && dart.equals(this[dartx.bottom], dart.dload(other, 'bottom'));
3081430814
}
3081530815
get hashCode() {
@@ -30818,10 +30818,10 @@ dart_library.library('dart_sdk', null, /* Imports */[
3081830818
intersection(other) {
3081930819
dart.as(other, math.Rectangle$(T));
3082030820
let x0 = math.max(T)(this[dartx.left], other[dartx.left]);
30821-
let x1 = math.min(core.num)(dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]), dart.notNull(other[dartx.left]) + dart.notNull(other[dartx.width]));
30821+
let x1 = math.min(T)(dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]), dart.notNull(other[dartx.left]) + dart.notNull(other[dartx.width]));
3082230822
if (dart.notNull(x0) <= dart.notNull(x1)) {
3082330823
let y0 = math.max(T)(this[dartx.top], other[dartx.top]);
30824-
let y1 = math.min(core.num)(dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]), dart.notNull(other[dartx.top]) + dart.notNull(other[dartx.height]));
30824+
let y1 = math.min(T)(dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]), dart.notNull(other[dartx.top]) + dart.notNull(other[dartx.height]));
3082530825
if (dart.notNull(y0) <= dart.notNull(y1)) {
3082630826
return new (math.Rectangle$(T))(x0, y0, dart.notNull(x1) - dart.notNull(x0), dart.notNull(y1) - dart.notNull(y0));
3082730827
}
@@ -30833,8 +30833,8 @@ dart_library.library('dart_sdk', null, /* Imports */[
3083330833
}
3083430834
boundingBox(other) {
3083530835
dart.as(other, math.Rectangle$(T));
30836-
let right = math.max(core.num)(dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]), dart.notNull(other[dartx.left]) + dart.notNull(other[dartx.width]));
30837-
let bottom = math.max(core.num)(dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]), dart.notNull(other[dartx.top]) + dart.notNull(other[dartx.height]));
30836+
let right = math.max(T)(dart.notNull(this[dartx.left]) + dart.notNull(this[dartx.width]), dart.notNull(other[dartx.left]) + dart.notNull(other[dartx.width]));
30837+
let bottom = math.max(T)(dart.notNull(this[dartx.top]) + dart.notNull(this[dartx.height]), dart.notNull(other[dartx.top]) + dart.notNull(other[dartx.height]));
3083830838
let left = math.min(T)(this[dartx.left], other[dartx.left]);
3083930839
let top = math.min(T)(this[dartx.top], other[dartx.top]);
3084030840
return new (math.Rectangle$(T))(left, top, dart.notNull(right) - dart.notNull(left), dart.notNull(bottom) - dart.notNull(top));
@@ -48310,7 +48310,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
4831048310
this[_ptr] = ptr;
4831148311
}
4831248312
get(type) {
48313-
return new html$._EventStream(this[_ptr], type, false);
48313+
return new (html$._EventStream$(html$.Event))(this[_ptr], type, false);
4831448314
}
4831548315
};
4831648316
dart.setSignature(html$.Events, {
@@ -48324,10 +48324,10 @@ dart_library.library('dart_sdk', null, /* Imports */[
4832448324
get(type) {
4832548325
if (dart.notNull(html$.ElementEvents.webkitEvents[dartx.keys][dartx.contains](type[dartx.toLowerCase]()))) {
4832648326
if (dart.notNull(html_common.Device.isWebKit)) {
48327-
return new html$._ElementEventStreamImpl(this[_ptr], html$.ElementEvents.webkitEvents[dartx.get](type[dartx.toLowerCase]()), false);
48327+
return new (html$._ElementEventStreamImpl$(html$.Event))(this[_ptr], html$.ElementEvents.webkitEvents[dartx.get](type[dartx.toLowerCase]()), false);
4832848328
}
4832948329
}
48330-
return new html$._ElementEventStreamImpl(this[_ptr], type, false);
48330+
return new (html$._ElementEventStreamImpl$(html$.Event))(this[_ptr], type, false);
4833148331
}
4833248332
};
4833348333
dart.setSignature(html$.ElementEvents, {
@@ -65773,24 +65773,24 @@ dart_library.library('dart_sdk', null, /* Imports */[
6577365773
}
6577465774
forTarget(e, opts) {
6577565775
let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false;
65776-
let stream = new html$._EventStream(e, this[_eventType], useCapture);
65776+
let stream = new (html$._EventStream$(html$.Event))(e, this[_eventType], useCapture);
6577765777
let controller = async.StreamController$(html$.BeforeUnloadEvent).new({sync: true});
6577865778
stream.listen(dart.fn(event => {
65779-
let wrapped = new html$._BeforeUnloadEvent(dart.as(event, html$.Event));
65779+
let wrapped = new html$._BeforeUnloadEvent(event);
6578065780
controller.add(wrapped);
65781-
}, dart.void, [dart.dynamic]));
65781+
}, dart.void, [html$.Event]));
6578265782
return controller.stream;
6578365783
}
6578465784
getEventType(target) {
6578565785
return this[_eventType];
6578665786
}
6578765787
forElement(e, opts) {
6578865788
let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false;
65789-
return new (html$._ElementEventStreamImpl$(html$.BeforeUnloadEvent))(e, this[_eventType], useCapture);
65789+
return new (html$._ElementEventStreamImpl$(html$.Event))(e, this[_eventType], useCapture);
6579065790
}
6579165791
[_forElementList](e, opts) {
6579265792
let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false;
65793-
return new (html$._ElementListEventStreamImpl$(html$.BeforeUnloadEvent))(e, this[_eventType], useCapture);
65793+
return new (html$._ElementListEventStreamImpl$(html$.Event))(e, this[_eventType], useCapture);
6579465794
}
6579565795
};
6579665796
html$._BeforeUnloadEventStreamProvider[dart.implements] = () => [html$.EventStreamProvider$(html$.BeforeUnloadEvent)];
@@ -68587,7 +68587,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
6858768587
}
6858868588
[_forElementList](e, opts) {
6858968589
let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false;
68590-
return new (html$._ElementListEventStreamImpl$(T))(e, this[_eventType], useCapture);
68590+
return new (html$._ElementListEventStreamImpl$(html$.Event))(e, this[_eventType], useCapture);
6859168591
}
6859268592
getEventType(target) {
6859368593
return this[_eventType];
@@ -70285,7 +70285,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
7028570285
this[_list$] = list;
7028670286
}
7028770287
get iterator() {
70288-
return new (html$._WrappedIterator$(E))(this[_list$][dartx.iterator]);
70288+
return new (html$._WrappedIterator$(html$.Node))(this[_list$][dartx.iterator]);
7028970289
}
7029070290
get length() {
7029170291
return this[_list$][dartx.length];

pkg/dev_compiler/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Dart Dev Compiler team <[email protected]>
88
homepage: https://github.com/dart-lang/dev_compiler
99

1010
dependencies:
11-
analyzer: ^0.27.3
11+
analyzer: ^0.27.4-alpha.2
1212
args: ^0.13.0
1313
bazel_worker: ^0.1.0
1414
cli_util: ^0.0.1

pkg/dev_compiler/tool/sdk_expected_errors.txt

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,36 @@
11
[error] The argument type 'InternalMap' cannot be assigned to the parameter type 'Map'. (dart:_isolate_helper/isolate_serialization.dart, line 47, col 47)
2-
[error] Missing concrete implementation of 'num.==' (dart:_interceptors/js_number.dart, line 12, col 7)
3-
[error] Missing concrete implementation of 'String.==' (dart:_interceptors/js_string.dart, line 14, col 7)
2+
[error] Base class introduces an invalid override. The type of JSArray.[]= ((int, E) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:_interceptors/js_array.dart, line 576, col 25)
3+
[error] Invalid override. The type of NativeTypedArrayOfDouble.[]= ((int, num) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:_native_typed_data, line 897, col 3)
4+
[error] Invalid override. The type of _JsonStringStringifierPretty.writeIndentation ((int) → void) is not a subtype of _JsonPrettyPrintMixin.writeIndentation ((dynamic) → void). (dart:convert/json.dart, line 875, col 3)
5+
[error] Invalid override. The type of _JsonUtf8StringifierPretty.writeIndentation ((int) → void) is not a subtype of _JsonPrettyPrintMixin.writeIndentation ((dynamic) → void). (dart:convert/json.dart, line 1034, col 3)
6+
[error] Invalid override. The type of DateTime.compareTo ((DateTime) → int) is not a subtype of Comparable<dynamic>.compareTo ((dynamic) → int). (dart:core/date_time.dart, line 412, col 3)
47
[error] Annotation can be only constant variable or constant constructor invocation (dart:core/stacktrace.dart, line 27, col 3)
8+
[error] Invalid override. The type of FileList.[]= ((int, File) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 16869, col 3)
9+
[error] Invalid override. The type of HtmlCollection.[]= ((int, Node) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 18904, col 3)
10+
[error] Invalid override. The type of MimeTypeArray.[]= ((int, MimeType) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 23818, col 3)
11+
[error] Invalid override. The type of NodeList.[]= ((int, Node) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 25467, col 3)
12+
[error] Invalid override. The type of PluginArray.[]= ((int, Plugin) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 26971, col 3)
13+
[error] Invalid override. The type of SourceBufferList.[]= ((int, SourceBuffer) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 30209, col 3)
14+
[error] Invalid override. The type of SpeechGrammarList.[]= ((int, SpeechGrammar) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 30410, col 3)
15+
[error] Invalid override. The type of TextTrackList.[]= ((int, TextTrack) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 32569, col 3)
16+
[error] Invalid override. The type of TouchList.[]= ((int, Touch) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 32904, col 3)
17+
[error] The return type '_ElementEventStreamImpl<Event>' is not a 'ElementStream<BeforeUnloadEvent>', as defined by the method 'forElement'. (dart:html, line 36588, col 12)
18+
[error] The return type '_ElementListEventStreamImpl<Event>' is not a 'ElementStream<BeforeUnloadEvent>', as defined by the method '_forElementList'. (dart:html, line 36593, col 12)
19+
[error] Invalid override. The type of _CssRuleList.[]= ((int, CssRule) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 37675, col 3)
20+
[error] Invalid override. The type of _GamepadList.[]= ((int, Gamepad) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 37929, col 3)
21+
[error] Invalid override. The type of _NamedNodeMap.[]= ((int, Node) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 38136, col 3)
22+
[error] Invalid override. The type of _SpeechRecognitionResultList.[]= ((int, SpeechRecognitionResult) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 38352, col 3)
23+
[error] Invalid override. The type of _StyleSheetList.[]= ((int, StyleSheet) → void) is not a subtype of JSMutableIndexable.[]= ((int, dynamic) → dynamic). (dart:html, line 38416, col 3)
24+
[error] The return type '_ElementListEventStreamImpl<Event>' is not a 'ElementStream<T>', as defined by the method '_forElementList'. (dart:html, line 39935, col 12)
525
[error] Invalid override. The type of _EventStreamSubscription.asFuture (([dynamic]) → Future<dynamic>) is not a subtype of StreamSubscription<T>.asFuture (<E>([E]) → Future<E>). (dart:html, line 40153, col 3)
26+
[error] The return type '_WrappedIterator<Node>' is not a 'Iterator<E>', as defined by the method 'iterator'. (dart:html, line 42531, col 31)
627
[error] The part was not supplied as an input to the compiler. (dart:html_common/conversions.dart, line 1, col 1)
728
[error] The part was not supplied as an input to the compiler. (dart:html_common/conversions_dart2js.dart, line 1, col 1)
829
[error] The part was not supplied as an input to the compiler. (dart:html_common/css_class_set.dart, line 1, col 1)
930
[error] The part was not supplied as an input to the compiler. (dart:html_common/device.dart, line 1, col 1)
1031
[error] The part was not supplied as an input to the compiler. (dart:html_common/filtered_element_list.dart, line 1, col 1)
1132
[error] The part was not supplied as an input to the compiler. (dart:html_common/lists.dart, line 1, col 1)
33+
[error] Invalid override. The type of JsArray.[]= ((Object, E) → void) is not a subtype of JsObject.[]= ((Object, dynamic) → dynamic). (dart:js, line 363, col 3)
1234
[warning] Unsound implicit cast from dynamic to List<String> (dart:_debugger, line 24, col 45)
1335
[warning] Unsound implicit cast from dynamic to List<String> (dart:_isolate_helper, line 839, col 37)
1436
[warning] Unsound implicit cast from dynamic to List<String> (dart:_isolate_helper, line 886, col 11)
@@ -191,33 +213,14 @@
191213
[warning] Unsound implicit cast from dynamic to Rectangle<num> (dart:html, line 37635, col 14)
192214
[warning] Unsound implicit cast from (T) → void to (Event) → dynamic (dart:html, line 40091, col 67)
193215
[warning] Unsound implicit cast from (T) → void to (Event) → dynamic (dart:html, line 40113, col 45)
194-
[warning] Unsound implicit cast from num to T (dart:math, line 85, col 16)
195-
[warning] Unsound implicit cast from num to T (dart:math, line 120, col 16)
196-
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 37, col 25)
197-
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 37, col 38)
198-
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 46, col 25)
199-
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 46, col 38)
216+
[warning] Unsound implicit cast from From to To (dart:html, line 42594, col 70)
217+
[warning] Unsound implicit cast from dynamic to To (dart:indexed_db, line 1205, col 37)
200218
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 59, col 25)
201219
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 59, col 37)
202-
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 86, col 12)
203-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 33, col 18)
204-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 35, col 19)
205-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 68, col 41)
206-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 68, col 50)
207-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 95, col 40)
208-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 95, col 54)
209-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 119, col 41)
210-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 120, col 44)
211-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 121, col 7)
212-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 123, col 7)
213220
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 151, col 22)
214221
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 152, col 23)
215-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 168, col 15)
216-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 170, col 16)
217222
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 212, col 23)
218223
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 213, col 24)
219-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 229, col 15)
220-
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 231, col 16)
221224
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 247, col 28)
222225
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 263, col 30)
223226
[warning] The final variables 'href' and 'target' must be initialized (dart:svg, line 60, col 3)

0 commit comments

Comments
 (0)