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

Unified Diff: test/codegen_expected/language/map_literal11_test.js

Issue 2211293002: Reify type params on map literals (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Remove unnecessary null check Created 4 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
Index: test/codegen_expected/language/map_literal11_test.js
diff --git a/test/codegen_expected/language/map_literal11_test.js b/test/codegen_expected/language/map_literal11_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..3b8527ec89f1006d132b0eec41536e6819d6e594
--- /dev/null
+++ b/test/codegen_expected/language/map_literal11_test.js
@@ -0,0 +1,27 @@
+dart_library.library('language/map_literal11_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__map_literal11_test(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const map_literal11_test = Object.create(null);
+ let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
+ let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionType(core.bool, [dart.dynamic])))();
+ let MapTovoid = () => (MapTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.Map])))();
+ map_literal11_test.foo = function(m) {
+ expect$.Expect.throws(dart.fn(() => {
+ m[dartx.set](23, 23);
+ }, VoidTovoid()), dart.fn(e => core.TypeError.is(e), dynamicTobool()));
+ };
+ dart.fn(map_literal11_test.foo, MapTovoid());
+ map_literal11_test.main = function() {
+ let map = dart.map({}, core.String, dart.dynamic);
+ map_literal11_test.foo(map);
+ };
+ dart.fn(map_literal11_test.main, VoidTovoid());
+ // Exports:
+ exports.map_literal11_test = map_literal11_test;
+});
« no previous file with comments | « test/codegen_expected/language/map_literal10_test.js ('k') | test/codegen_expected/language/map_literal1_test_none_multi.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698