Skip to content

Commit

Permalink
Pickup latest analyzer fixes
Browse files Browse the repository at this point in the history
Note the new errors in sdk.  Did we change something wrt overrides?

R=leafp@google.com

Review URL: https://codereview.chromium.org/1951263004 .
  • Loading branch information
vsmenon committed May 5, 2016
1 parent 155597e commit 7d32105
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 39 deletions.
30 changes: 15 additions & 15 deletions pkg/dev_compiler/lib/runtime/dart_sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -30809,7 +30809,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
return `Rectangle (${this[dartx.left]}, ${this[dartx.top]}) ${this[dartx.width]} x ${this[dartx.height]}`;
}
['=='](other) {
if (!dart.is(other, math.Rectangle)) return false;
if (!dart.is(other, math.Rectangle$(core.num))) return false;
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'));
}
get hashCode() {
Expand All @@ -30818,10 +30818,10 @@ dart_library.library('dart_sdk', null, /* Imports */[
intersection(other) {
dart.as(other, math.Rectangle$(T));
let x0 = math.max(T)(this[dartx.left], other[dartx.left]);
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]));
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]));
if (dart.notNull(x0) <= dart.notNull(x1)) {
let y0 = math.max(T)(this[dartx.top], other[dartx.top]);
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]));
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]));
if (dart.notNull(y0) <= dart.notNull(y1)) {
return new (math.Rectangle$(T))(x0, y0, dart.notNull(x1) - dart.notNull(x0), dart.notNull(y1) - dart.notNull(y0));
}
Expand All @@ -30833,8 +30833,8 @@ dart_library.library('dart_sdk', null, /* Imports */[
}
boundingBox(other) {
dart.as(other, math.Rectangle$(T));
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]));
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]));
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]));
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]));
let left = math.min(T)(this[dartx.left], other[dartx.left]);
let top = math.min(T)(this[dartx.top], other[dartx.top]);
return new (math.Rectangle$(T))(left, top, dart.notNull(right) - dart.notNull(left), dart.notNull(bottom) - dart.notNull(top));
Expand Down Expand Up @@ -48310,7 +48310,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
this[_ptr] = ptr;
}
get(type) {
return new html$._EventStream(this[_ptr], type, false);
return new (html$._EventStream$(html$.Event))(this[_ptr], type, false);
}
};
dart.setSignature(html$.Events, {
Expand All @@ -48324,10 +48324,10 @@ dart_library.library('dart_sdk', null, /* Imports */[
get(type) {
if (dart.notNull(html$.ElementEvents.webkitEvents[dartx.keys][dartx.contains](type[dartx.toLowerCase]()))) {
if (dart.notNull(html_common.Device.isWebKit)) {
return new html$._ElementEventStreamImpl(this[_ptr], html$.ElementEvents.webkitEvents[dartx.get](type[dartx.toLowerCase]()), false);
return new (html$._ElementEventStreamImpl$(html$.Event))(this[_ptr], html$.ElementEvents.webkitEvents[dartx.get](type[dartx.toLowerCase]()), false);
}
}
return new html$._ElementEventStreamImpl(this[_ptr], type, false);
return new (html$._ElementEventStreamImpl$(html$.Event))(this[_ptr], type, false);
}
};
dart.setSignature(html$.ElementEvents, {
Expand Down Expand Up @@ -65773,24 +65773,24 @@ dart_library.library('dart_sdk', null, /* Imports */[
}
forTarget(e, opts) {
let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false;
let stream = new html$._EventStream(e, this[_eventType], useCapture);
let stream = new (html$._EventStream$(html$.Event))(e, this[_eventType], useCapture);
let controller = async.StreamController$(html$.BeforeUnloadEvent).new({sync: true});
stream.listen(dart.fn(event => {
let wrapped = new html$._BeforeUnloadEvent(dart.as(event, html$.Event));
let wrapped = new html$._BeforeUnloadEvent(event);
controller.add(wrapped);
}, dart.void, [dart.dynamic]));
}, dart.void, [html$.Event]));
return controller.stream;
}
getEventType(target) {
return this[_eventType];
}
forElement(e, opts) {
let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false;
return new (html$._ElementEventStreamImpl$(html$.BeforeUnloadEvent))(e, this[_eventType], useCapture);
return new (html$._ElementEventStreamImpl$(html$.Event))(e, this[_eventType], useCapture);
}
[_forElementList](e, opts) {
let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false;
return new (html$._ElementListEventStreamImpl$(html$.BeforeUnloadEvent))(e, this[_eventType], useCapture);
return new (html$._ElementListEventStreamImpl$(html$.Event))(e, this[_eventType], useCapture);
}
};
html$._BeforeUnloadEventStreamProvider[dart.implements] = () => [html$.EventStreamProvider$(html$.BeforeUnloadEvent)];
Expand Down Expand Up @@ -68587,7 +68587,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
}
[_forElementList](e, opts) {
let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false;
return new (html$._ElementListEventStreamImpl$(T))(e, this[_eventType], useCapture);
return new (html$._ElementListEventStreamImpl$(html$.Event))(e, this[_eventType], useCapture);
}
getEventType(target) {
return this[_eventType];
Expand Down Expand Up @@ -70285,7 +70285,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
this[_list$] = list;
}
get iterator() {
return new (html$._WrappedIterator$(E))(this[_list$][dartx.iterator]);
return new (html$._WrappedIterator$(html$.Node))(this[_list$][dartx.iterator]);
}
get length() {
return this[_list$][dartx.length];
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev_compiler/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author: Dart Dev Compiler team <dev-compiler@dartlang.org>
homepage: https://github.com/dart-lang/dev_compiler

dependencies:
analyzer: ^0.27.3
analyzer: ^0.27.4-alpha.2
args: ^0.13.0
bazel_worker: ^0.1.0
cli_util: ^0.0.1
Expand Down
49 changes: 26 additions & 23 deletions pkg/dev_compiler/tool/sdk_expected_errors.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
[error] The argument type 'InternalMap' cannot be assigned to the parameter type 'Map'. (dart:_isolate_helper/isolate_serialization.dart, line 47, col 47)
[error] Missing concrete implementation of 'num.==' (dart:_interceptors/js_number.dart, line 12, col 7)
[error] Missing concrete implementation of 'String.==' (dart:_interceptors/js_string.dart, line 14, col 7)
[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)
[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)
[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)
[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)
[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)
[error] Annotation can be only constant variable or constant constructor invocation (dart:core/stacktrace.dart, line 27, col 3)
[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)
[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)
[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)
[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)
[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)
[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)
[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)
[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)
[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)
[error] The return type '_ElementEventStreamImpl<Event>' is not a 'ElementStream<BeforeUnloadEvent>', as defined by the method 'forElement'. (dart:html, line 36588, col 12)
[error] The return type '_ElementListEventStreamImpl<Event>' is not a 'ElementStream<BeforeUnloadEvent>', as defined by the method '_forElementList'. (dart:html, line 36593, col 12)
[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)
[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)
[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)
[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)
[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)
[error] The return type '_ElementListEventStreamImpl<Event>' is not a 'ElementStream<T>', as defined by the method '_forElementList'. (dart:html, line 39935, col 12)
[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)
[error] The return type '_WrappedIterator<Node>' is not a 'Iterator<E>', as defined by the method 'iterator'. (dart:html, line 42531, col 31)
[error] The part was not supplied as an input to the compiler. (dart:html_common/conversions.dart, line 1, col 1)
[error] The part was not supplied as an input to the compiler. (dart:html_common/conversions_dart2js.dart, line 1, col 1)
[error] The part was not supplied as an input to the compiler. (dart:html_common/css_class_set.dart, line 1, col 1)
[error] The part was not supplied as an input to the compiler. (dart:html_common/device.dart, line 1, col 1)
[error] The part was not supplied as an input to the compiler. (dart:html_common/filtered_element_list.dart, line 1, col 1)
[error] The part was not supplied as an input to the compiler. (dart:html_common/lists.dart, line 1, col 1)
[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)
[warning] Unsound implicit cast from dynamic to List<String> (dart:_debugger, line 24, col 45)
[warning] Unsound implicit cast from dynamic to List<String> (dart:_isolate_helper, line 839, col 37)
[warning] Unsound implicit cast from dynamic to List<String> (dart:_isolate_helper, line 886, col 11)
Expand Down Expand Up @@ -191,33 +213,14 @@
[warning] Unsound implicit cast from dynamic to Rectangle<num> (dart:html, line 37635, col 14)
[warning] Unsound implicit cast from (T) → void to (Event) → dynamic (dart:html, line 40091, col 67)
[warning] Unsound implicit cast from (T) → void to (Event) → dynamic (dart:html, line 40113, col 45)
[warning] Unsound implicit cast from num to T (dart:math, line 85, col 16)
[warning] Unsound implicit cast from num to T (dart:math, line 120, col 16)
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 37, col 25)
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 37, col 38)
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 46, col 25)
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 46, col 38)
[warning] Unsound implicit cast from From to To (dart:html, line 42594, col 70)
[warning] Unsound implicit cast from dynamic to To (dart:indexed_db, line 1205, col 37)
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 59, col 25)
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 59, col 37)
[warning] Unsound implicit cast from num to T (dart:math/point.dart, line 86, col 12)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 33, col 18)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 35, col 19)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 68, col 41)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 68, col 50)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 95, col 40)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 95, col 54)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 119, col 41)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 120, col 44)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 121, col 7)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 123, col 7)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 151, col 22)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 152, col 23)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 168, col 15)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 170, col 16)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 212, col 23)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 213, col 24)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 229, col 15)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 231, col 16)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 247, col 28)
[warning] Unsound implicit cast from num to T (dart:math/rectangle.dart, line 263, col 30)
[warning] The final variables 'href' and 'target' must be initialized (dart:svg, line 60, col 3)
Expand Down

0 comments on commit 7d32105

Please sign in to comment.