Chromium Code Reviews

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

Issue 1316723003: implement null aware ops, fixes #249 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: lib/runtime/dart/_internal.js
diff --git a/lib/runtime/dart/_internal.js b/lib/runtime/dart/_internal.js
index b77e4578d05de7ce723293f54b47341ffc984642..8f2e5dd0c6e7d42ceec2f59460d3d4999b01ca71 100644
--- a/lib/runtime/dart/_internal.js
+++ b/lib/runtime/dart/_internal.js
@@ -1655,6 +1655,7 @@ dart_library.library('dart/_internal', null, /* Imports */[
set(index, value) {
dart.as(value, E);
dart.throw(new core.UnsupportedError("Cannot modify an unmodifiable list"));
+ return value;
}
set length(newLength) {
dart.throw(new core.UnsupportedError("Cannot change the length of an unmodifiable list"));
@@ -1857,6 +1858,7 @@ dart_library.library('dart/_internal', null, /* Imports */[
set(key, value) {
dart.as(value, E);
dart.throw(new core.UnsupportedError("Cannot modify an unmodifiable map"));
+ return value;
}
putIfAbsent(key, ifAbsent) {
dart.as(ifAbsent, dart.functionType(E, []));

Powered by Google App Engine