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

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

Issue 1117793002: add checks needed for covariant generics, and List<E> (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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 | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/convert.js
diff --git a/lib/runtime/dart/convert.js b/lib/runtime/dart/convert.js
index 4e2423972ae577ef125aa45cf2ab11689ede029c..4d73be7cd1ab9cd359f469aa712218bb470e610d 100644
--- a/lib/runtime/dart/convert.js
+++ b/lib/runtime/dart/convert.js
@@ -9,12 +9,15 @@ var convert;
Codec() {
}
encode(input) {
+ dart.as(input, S);
return this.encoder.convert(input);
}
decode(encoded) {
+ dart.as(encoded, T);
return this.decoder.convert(encoded);
}
fuse(other) {
+ dart.as(other, Codec$(T, dart.dynamic));
return new (_FusedCodec$(S, T, dart.dynamic))(this, other);
}
get inverted() {
@@ -79,6 +82,7 @@ var convert;
Converter() {
}
fuse(other) {
+ dart.as(other, Converter$(T, dart.dynamic));
return new (_FusedConverter$(S, T, dart.dynamic))(this, other);
}
startChunkedConversion(sink) {
@@ -380,6 +384,7 @@ var convert;
super.ChunkedConversionSink();
}
add(chunk) {
+ dart.as(chunk, T);
this[_accumulated][core.$add](chunk);
}
close() {
@@ -395,6 +400,7 @@ var convert;
this[_sink] = sink;
}
add(data) {
+ dart.as(data, T);
return this[_sink].add(data);
}
close() {
@@ -414,6 +420,7 @@ var convert;
this[_chunkedSink] = converter.startChunkedConversion(sink);
}
add(o) {
+ dart.as(o, S);
return this[_chunkedSink].add(o);
}
addError(error, stackTrace) {
@@ -476,6 +483,7 @@ var convert;
super.Converter();
}
convert(input) {
+ dart.as(input, S);
return dart.as(this[_second].convert(this[_first].convert(input)), T);
}
startChunkedConversion(sink) {
« no previous file with comments | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698