| OLD | NEW |
| 1 dart_library.library('language/call_with_no_such_method_test', null, /* Imports
*/[ | 1 dart_library.library('language/call_with_no_such_method_test', null, /* Imports
*/[ |
| 2 'dart_sdk', | 2 'dart_sdk', |
| 3 'expect' | 3 'expect' |
| 4 ], function load__call_with_no_such_method_test(exports, dart_sdk, expect) { | 4 ], function load__call_with_no_such_method_test(exports, dart_sdk, expect) { |
| 5 'use strict'; | 5 'use strict'; |
| 6 const core = dart_sdk.core; | 6 const core = dart_sdk.core; |
| 7 const _interceptors = dart_sdk._interceptors; | 7 const _interceptors = dart_sdk._interceptors; |
| 8 const dart = dart_sdk.dart; | 8 const dart = dart_sdk.dart; |
| 9 const dartx = dart_sdk.dartx; | 9 const dartx = dart_sdk.dartx; |
| 10 const expect$ = expect.expect; | 10 const expect$ = expect.expect; |
| 11 const call_with_no_such_method_test = Object.create(null); | 11 const call_with_no_such_method_test = Object.create(null); |
| 12 let JSArrayOfString = () => (JSArrayOfString = dart.constFn(_interceptors.JSAr
ray$(core.String)))(); | 12 let JSArrayOfString = () => (JSArrayOfString = dart.constFn(_interceptors.JSAr
ray$(core.String)))(); |
| 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); | 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 14 let const$; | 14 let const$; |
| 15 call_with_no_such_method_test.F = dart.callableClass(function F(...args) { | 15 call_with_no_such_method_test.F = dart.callableClass(function F(...args) { |
| 16 const self = this; | |
| 17 function call(...args) { | 16 function call(...args) { |
| 18 return self.call.apply(self, args); | 17 return call.call.apply(call, args); |
| 19 } | 18 } |
| 20 call.__proto__ = this.__proto__; | 19 call.__proto__ = this.__proto__; |
| 21 call.new.apply(call, args); | 20 call.new.apply(call, args); |
| 22 return call; | 21 return call; |
| 23 }, class F extends core.Object { | 22 }, class F extends core.Object { |
| 24 call() { | 23 call() { |
| 25 return null; | 24 return null; |
| 26 } | 25 } |
| 27 noSuchMethod(i) { | 26 noSuchMethod(i) { |
| 28 if (dart.equals(i.memberName, const$ || (const$ = dart.const(core.Symbol.n
ew('call')))) && dart.test(i.isMethod)) { | 27 if (dart.equals(i.memberName, const$ || (const$ = dart.const(core.Symbol.n
ew('call')))) && dart.test(i.isMethod)) { |
| 29 return i.positionalArguments[dartx.get](0); | 28 return i.positionalArguments[dartx.get](0); |
| 30 } | 29 } |
| 31 return super.noSuchMethod(i); | 30 return super.noSuchMethod(i); |
| 32 } | 31 } |
| 33 }); | 32 }); |
| 34 dart.setSignature(call_with_no_such_method_test.F, { | 33 dart.setSignature(call_with_no_such_method_test.F, { |
| 35 methods: () => ({call: dart.definiteFunctionType(dart.dynamic, [])}) | 34 methods: () => ({call: dart.definiteFunctionType(dart.dynamic, [])}) |
| 36 }); | 35 }); |
| 37 call_with_no_such_method_test.main = function() { | 36 call_with_no_such_method_test.main = function() { |
| 38 let result = core.Function.apply(new call_with_no_such_method_test.F(), JSAr
rayOfString().of(['a', 'b', 'c', 'd'])); | 37 let result = core.Function.apply(new call_with_no_such_method_test.F(), JSAr
rayOfString().of(['a', 'b', 'c', 'd'])); |
| 39 expect$.Expect.equals('a', result); | 38 expect$.Expect.equals('a', result); |
| 40 }; | 39 }; |
| 41 dart.fn(call_with_no_such_method_test.main, VoidTodynamic()); | 40 dart.fn(call_with_no_such_method_test.main, VoidTodynamic()); |
| 42 // Exports: | 41 // Exports: |
| 43 exports.call_with_no_such_method_test = call_with_no_such_method_test; | 42 exports.call_with_no_such_method_test = call_with_no_such_method_test; |
| 44 }); | 43 }); |
| OLD | NEW |