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

Unified Diff: pkg/dev_compiler/lib/js/es6/dart_sdk.js

Side-by-side diff isn't available for this file because of its large size.
Issue 2378423003: Fix some errors around []= in core types. (Closed)
Patch Set: Created 4 years, 2 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:
Download patch
Index: pkg/dev_compiler/lib/js/es6/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/es6/dart_sdk.js b/pkg/dev_compiler/lib/js/es6/dart_sdk.js
index c99499b52dfa537498441df5b1c3dfec572b6a74..e0d4c583d658208905bfc27a090c954def982386 100644
--- a/pkg/dev_compiler/lib/js/es6/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/es6/dart_sdk.js
@@ -46,12 +46,14 @@ let LinkedHashMapOfString$Object = () => (LinkedHashMapOfString$Object = dart.co
let ListOfNameValuePair = () => (ListOfNameValuePair = dart.constFn(core.List$(_debugger.NameValuePair)))();
let JSArrayOfString = () => (JSArrayOfString = dart.constFn(_interceptors.JSArray$(core.String)))();
let JSArrayOfJsonMLFormatter = () => (JSArrayOfJsonMLFormatter = dart.constFn(_interceptors.JSArray$(_debugger.JsonMLFormatter)))();
+let JSIndexable = () => (JSIndexable = dart.constFn(_interceptors.JSIndexable$()))();
let JSArray = () => (JSArray = dart.constFn(_interceptors.JSArray$()))();
let JSMutableArray = () => (JSMutableArray = dart.constFn(_interceptors.JSMutableArray$()))();
let JSFixedArray = () => (JSFixedArray = dart.constFn(_interceptors.JSFixedArray$()))();
let JSExtendableArray = () => (JSExtendableArray = dart.constFn(_interceptors.JSExtendableArray$()))();
let JSUnmodifiableArray = () => (JSUnmodifiableArray = dart.constFn(_interceptors.JSUnmodifiableArray$()))();
let ArrayIterator = () => (ArrayIterator = dart.constFn(_interceptors.ArrayIterator$()))();
+let JSIndexableOfString = () => (JSIndexableOfString = dart.constFn(_interceptors.JSIndexable$(core.String)))();
let MatchToString = () => (MatchToString = dart.constFn(dart.functionType(core.String, [core.Match])))();
let StringToString = () => (StringToString = dart.constFn(dart.functionType(core.String, [core.String])))();
let ComparableOfnum = () => (ComparableOfnum = dart.constFn(core.Comparable$(core.num)))();
@@ -3553,8 +3555,12 @@ dart.setSignature(_interceptors.JSBool, {
constructors: () => ({new: dart.definiteFunctionType(_interceptors.JSBool, [])})
});
dart.registerExtension(dart.global.Boolean, _interceptors.JSBool);
-_interceptors.JSIndexable = class JSIndexable extends core.Object {};
-_interceptors.JSMutableIndexable = class JSMutableIndexable extends _interceptors.JSIndexable {};
+_interceptors.JSIndexable$ = dart.generic(E => {
+ class JSIndexable extends core.Object {}
+ dart.addTypeTests(JSIndexable);
+ return JSIndexable;
+});
+_interceptors.JSIndexable = JSIndexable();
_interceptors.JSObject = class JSObject extends core.Object {};
_interceptors.JavaScriptObject = class JavaScriptObject extends _interceptors.Interceptor {
new() {
@@ -3617,6 +3623,7 @@ _interceptors.JSArray$ = dart.generic(E => {
let SetOfE = () => (SetOfE = dart.constFn(core.Set$(E)))();
let ArrayIteratorOfE = () => (ArrayIteratorOfE = dart.constFn(_interceptors.ArrayIterator$(E)))();
let ListMapViewOfE = () => (ListMapViewOfE = dart.constFn(_internal.ListMapView$(E)))();
+ let JSIndexableOfE = () => (JSIndexableOfE = dart.constFn(_interceptors.JSIndexable$(E)))();
let ETobool = () => (ETobool = dart.constFn(dart.functionType(core.bool, [E])))();
let ETovoid = () => (ETovoid = dart.constFn(dart.functionType(dart.void, [E])))();
let EAndEToint = () => (EAndEToint = dart.constFn(dart.functionType(core.int, [E, E])))();
@@ -4174,7 +4181,7 @@ _interceptors.JSArray$ = dart.generic(E => {
}
dart.setExtensionBaseClass(JSArray, dart.global.Array);
dart.addTypeTests(JSArray);
- JSArray[dart.implements] = () => [ListOfE(), _interceptors.JSIndexable];
+ JSArray[dart.implements] = () => [ListOfE(), JSIndexableOfE()];
dart.setSignature(JSArray, {
constructors: () => ({
new: dart.definiteFunctionType(_interceptors.JSArray$(E), []),
@@ -4259,7 +4266,6 @@ _interceptors.JSMutableArray$ = dart.generic(E => {
super.new();
}
}
- JSMutableArray[dart.implements] = () => [_interceptors.JSMutableIndexable];
return JSMutableArray;
});
_interceptors.JSMutableArray = JSMutableArray();
@@ -5335,7 +5341,7 @@ _interceptors.JSString = class JSString extends _interceptors.Interceptor {
return this[index];
}
};
-_interceptors.JSString[dart.implements] = () => [core.String, _interceptors.JSIndexable];
+_interceptors.JSString[dart.implements] = () => [core.String, JSIndexableOfString()];
dart.setSignature(_interceptors.JSString, {
constructors: () => ({new: dart.definiteFunctionType(_interceptors.JSString, [])}),
getters: () => ({
@@ -11555,7 +11561,7 @@ dart.setSignature(_js_helper.JSName, {
constructors: () => ({new: dart.definiteFunctionType(_js_helper.JSName, [core.String])}),
fields: () => ({name: core.String})
});
-_js_helper.JavaScriptIndexingBehavior = class JavaScriptIndexingBehavior extends _interceptors.JSMutableIndexable {};
+_js_helper.JavaScriptIndexingBehavior = class JavaScriptIndexingBehavior extends core.Object {};
_js_helper.TypeErrorImplementation = class TypeErrorImplementation extends core.Error {
new(value, actualType, expectedType) {
this.message = dart.str`Type '${actualType}' is not a subtype ` + dart.str`of type '${expectedType}'`;

Powered by Google App Engine
This is Rietveld 408576698