Index: test/codegen/expect/language/licm2_test.js |
diff --git a/test/codegen/expect/language/licm2_test.js b/test/codegen/expect/language/licm2_test.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9ecd31429b0b0cf5ac5244bc05b7d60152f0a84f |
--- /dev/null |
+++ b/test/codegen/expect/language/licm2_test.js |
@@ -0,0 +1,28 @@ |
+dart_library.library('language/licm2_test', null, /* Imports */[ |
+ 'dart_sdk', |
+ 'expect' |
+], function load__licm2_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 licm2_test = Object.create(null); |
+ let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))(); |
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))(); |
+ licm2_test.a = 42; |
+ licm2_test.b = null; |
+ licm2_test.main = function() { |
+ expect$.Expect.throws(dart.fn(() => { |
+ while (true) { |
+ licm2_test.a = 54; |
+ dart.dload(licm2_test.b, 'length'); |
+ } |
+ }, VoidTovoid())); |
+ licm2_test.b = []; |
+ expect$.Expect.equals(54, licm2_test.a); |
+ }; |
+ dart.fn(licm2_test.main, VoidTodynamic()); |
+ // Exports: |
+ exports.licm2_test = licm2_test; |
+}); |