Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Unified Diff: lib/runtime/dart/js.js

Issue 1311863005: Infer parameter types on overrides (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Infer on untyped default optional params as well Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/src/checker/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/js.js
diff --git a/lib/runtime/dart/js.js b/lib/runtime/dart/js.js
index df934172693fb42e6e65f8334bb1cafeba39ab09..fb4040e4d069fe456df475abdb17e6591215ed53 100644
--- a/lib/runtime/dart/js.js
+++ b/lib/runtime/dart/js.js
@@ -201,15 +201,15 @@ dart_library.library('dart/js', null, /* Imports */[
}
}
get(index) {
- if (dart.is(index, core.num) && dart.equals(index, dart.dsend(index, 'toInt'))) {
- this[_checkIndex](dart.as(index, core.int));
+ if (dart.is(index, core.num) && index == index[dartx.toInt]()) {
+ this[_checkIndex](index);
}
return dart.as(super.get(index), E);
}
set(index, value) {
dart.as(value, E);
- if (dart.is(index, core.num) && dart.equals(index, dart.dsend(index, 'toInt'))) {
- this[_checkIndex](dart.as(index, core.int));
+ if (dart.is(index, core.num) && index == index[dartx.toInt]()) {
+ this[_checkIndex](index);
}
super.set(index, value);
}
@@ -282,8 +282,8 @@ dart_library.library('dart/js', null, /* Imports */[
methods: () => ({
[_checkIndex]: [dart.dynamic, [core.int]],
[_checkInsertIndex]: [dart.dynamic, [core.int]],
- get: [E, [dart.dynamic]],
- set: [dart.void, [dart.dynamic, E]],
+ get: [E, [core.int]],
+ set: [dart.void, [core.int, E]],
add: [dart.void, [E]],
addAll: [dart.void, [core.Iterable$(E)]],
insert: [dart.void, [core.int, E]],
« no previous file with comments | « no previous file | lib/src/checker/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698