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

Side by Side Diff: test/codegen/expect/methods.js

Issue 1989663002: fix #470, string interpolation now respects Dart toString (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « test/codegen/expect/map_keys.js.map ('k') | test/codegen/expect/misc.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('methods', null, /* Imports */[ 1 dart_library.library('methods', null, /* Imports */[
2 'dart_sdk' 2 'dart_sdk'
3 ], function(exports, dart_sdk) { 3 ], function(exports, dart_sdk) {
4 'use strict'; 4 'use strict';
5 const core = dart_sdk.core; 5 const core = dart_sdk.core;
6 const dart = dart_sdk.dart; 6 const dart = dart_sdk.dart;
7 const dartx = dart_sdk.dartx; 7 const dartx = dart_sdk.dartx;
8 const methods = Object.create(null); 8 const methods = Object.create(null);
9 const _c = Symbol('_c'); 9 const _c = Symbol('_c');
10 methods.A = class A extends core.Object { 10 methods.A = class A extends core.Object {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 z: [core.int, [], [core.num]], 59 z: [core.int, [], [core.num]],
60 zz: [core.int, [], [core.int]], 60 zz: [core.int, [], [core.int]],
61 w: [core.int, [core.int], {b: core.num}], 61 w: [core.int, [core.int], {b: core.num}],
62 ww: [core.int, [core.int], {b: core.int}], 62 ww: [core.int, [core.int], {b: core.int}],
63 clashWithObjectProperty: [dart.dynamic, [], {constructor: dart.dynamic}], 63 clashWithObjectProperty: [dart.dynamic, [], {constructor: dart.dynamic}],
64 clashWithJsReservedName: [dart.dynamic, [], {function: dart.dynamic}] 64 clashWithJsReservedName: [dart.dynamic, [], {function: dart.dynamic}]
65 }) 65 })
66 }); 66 });
67 methods.Bar = class Bar extends core.Object { 67 methods.Bar = class Bar extends core.Object {
68 call(x) { 68 call(x) {
69 return core.print(`hello from ${x}`); 69 return core.print(dart.str`hello from ${x}`);
70 } 70 }
71 }; 71 };
72 dart.setSignature(methods.Bar, { 72 dart.setSignature(methods.Bar, {
73 methods: () => ({call: [dart.dynamic, [dart.dynamic]]}) 73 methods: () => ({call: [dart.dynamic, [dart.dynamic]]})
74 }); 74 });
75 methods.Foo = class Foo extends core.Object { 75 methods.Foo = class Foo extends core.Object {
76 new() { 76 new() {
77 this.bar = new methods.Bar(); 77 this.bar = new methods.Bar();
78 } 78 }
79 }; 79 };
80 methods.test = function() { 80 methods.test = function() {
81 let f = new methods.Foo(); 81 let f = new methods.Foo();
82 dart.dsend(f, 'bar', "Bar's call method!"); 82 dart.dsend(f, 'bar', "Bar's call method!");
83 let a = new methods.A(); 83 let a = new methods.A();
84 let g = dart.bind(a, 'x'); 84 let g = dart.bind(a, 'x');
85 let aa = new methods.A(); 85 let aa = new methods.A();
86 let h = dart.dload(aa, 'x'); 86 let h = dart.dload(aa, 'x');
87 let ts = dart.bind(a, 'toString'); 87 let ts = dart.bind(a, 'toString');
88 let nsm = dart.bind(a, 'noSuchMethod'); 88 let nsm = dart.bind(a, 'noSuchMethod');
89 let c = dart.bind("", dartx.padLeft); 89 let c = dart.bind("", dartx.padLeft);
90 let r = dart.bind(3.0, dartx.floor); 90 let r = dart.bind(3.0, dartx.floor);
91 }; 91 };
92 dart.fn(methods.test); 92 dart.fn(methods.test);
93 // Exports: 93 // Exports:
94 exports.methods = methods; 94 exports.methods = methods;
95 }); 95 });
OLDNEW
« no previous file with comments | « test/codegen/expect/map_keys.js.map ('k') | test/codegen/expect/misc.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698