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

Side by Side Diff: test/codegen_expected/language/call_argument_inference_test.js

Issue 2200913002: fixes #616, statics on callable functions (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 dart_library.library('language/call_argument_inference_test', null, /* Imports * /[ 1 dart_library.library('language/call_argument_inference_test', null, /* Imports * /[
2 'dart_sdk', 2 'dart_sdk',
3 'expect' 3 'expect'
4 ], function load__call_argument_inference_test(exports, dart_sdk, expect) { 4 ], function load__call_argument_inference_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 dart = dart_sdk.dart; 7 const dart = dart_sdk.dart;
8 const dartx = dart_sdk.dartx; 8 const dartx = dart_sdk.dartx;
9 const expect$ = expect.expect; 9 const expect$ = expect.expect;
10 const call_argument_inference_test = Object.create(null); 10 const call_argument_inference_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))(); 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 call_argument_inference_test.A = dart.callableClass(function A(...args) { 12 call_argument_inference_test.A = dart.callableClass(function A(...args) {
13 const self = this;
14 function call(...args) { 13 function call(...args) {
15 return self.call.apply(self, args); 14 return call.call.apply(call, args);
16 } 15 }
17 call.__proto__ = this.__proto__; 16 call.__proto__ = this.__proto__;
18 call.new.apply(call, args); 17 call.new.apply(call, args);
19 return call; 18 return call;
20 }, class A extends core.Object { 19 }, class A extends core.Object {
21 call(a) { 20 call(a) {
22 return typeof a == 'number'; 21 return typeof a == 'number';
23 } 22 }
24 }); 23 });
25 dart.setSignature(call_argument_inference_test.A, { 24 dart.setSignature(call_argument_inference_test.A, {
26 methods: () => ({call: dart.definiteFunctionType(dart.dynamic, [dart.dynamic ])}) 25 methods: () => ({call: dart.definiteFunctionType(dart.dynamic, [dart.dynamic ])})
27 }); 26 });
28 call_argument_inference_test.main = function() { 27 call_argument_inference_test.main = function() {
29 expect$.Expect.isTrue(new call_argument_inference_test.A().call(42)); 28 expect$.Expect.isTrue(new call_argument_inference_test.A().call(42));
30 expect$.Expect.isFalse(dart.dcall(new call_argument_inference_test.A(), 'foo ')); 29 expect$.Expect.isFalse(dart.dcall(new call_argument_inference_test.A(), 'foo '));
31 }; 30 };
32 dart.fn(call_argument_inference_test.main, VoidTodynamic()); 31 dart.fn(call_argument_inference_test.main, VoidTodynamic());
33 // Exports: 32 // Exports:
34 exports.call_argument_inference_test = call_argument_inference_test; 33 exports.call_argument_inference_test = call_argument_inference_test;
35 }); 34 });
OLDNEW
« no previous file with comments | « test/codegen_expected/corelib/apply_test.js ('k') | test/codegen_expected/language/call_function_apply_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698