OLD | NEW |
1 define(['dart_sdk'], function(dart_sdk) { | 1 define(['dart_sdk'], function(dart_sdk) { |
2 'use strict'; | 2 'use strict'; |
3 const core = dart_sdk.core; | 3 const core = dart_sdk.core; |
4 const dart = dart_sdk.dart; | 4 const dart = dart_sdk.dart; |
5 const dartx = dart_sdk.dartx; | 5 const dartx = dart_sdk.dartx; |
6 const unresolved_names = Object.create(null); | 6 const unresolved_names = Object.create(null); |
7 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.fnType(dart.dynam
ic, [])))(); | 7 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.fnType(dart.dynam
ic, [])))(); |
8 unresolved_names.C = class C extends core.Object {}; | 8 unresolved_names.C = class C extends core.Object {}; |
| 9 (unresolved_names.C.new = function() { |
| 10 }).prototype = unresolved_names.C.prototype; |
9 unresolved_names.main = function() { | 11 unresolved_names.main = function() { |
10 new (dart.throw("compile error: unresolved constructor: " + "dynamic" + "."
+ "<unnamed>"))(); | 12 new (dart.throw(Error("compile error: unresolved constructor: " + "dynamic"
+ "." + "<unnamed>")))(); |
11 new (dart.throw("compile error: unresolved constructor: " + "C" + "." + "bar
"))(); | 13 new (dart.throw(Error("compile error: unresolved constructor: " + "C" + "."
+ "bar")))(); |
12 core.print(dart.throw("compile error: unresolved identifier: " + "baz")); | 14 core.print(dart.throw(Error("compile error: unresolved identifier: " + "baz"
))); |
13 core.print(dart.dload(unresolved_names.C, 'quux')); | 15 core.print(dart.dload(unresolved_names.C, 'quux')); |
14 }; | 16 }; |
15 dart.fn(unresolved_names.main, VoidTodynamic()); | 17 dart.fn(unresolved_names.main, VoidTodynamic()); |
16 dart.trackLibraries("unresolved_names", { | 18 dart.trackLibraries("unresolved_names", { |
17 "unresolved_names.dart": unresolved_names | 19 "unresolved_names.dart": unresolved_names |
18 }, null); | 20 }, null); |
19 // Exports: | 21 // Exports: |
20 return { | 22 return { |
21 unresolved_names: unresolved_names | 23 unresolved_names: unresolved_names |
22 }; | 24 }; |
23 }); | 25 }); |
OLD | NEW |