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

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

Issue 1137543005: Type check binary expressions (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase and remove assert Created 5 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
OLDNEW
1 var fieldtest = dart.defineLibrary(fieldtest, {}); 1 var fieldtest = dart.defineLibrary(fieldtest, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 (function(exports, core) { 3 (function(exports, core) {
4 'use strict'; 4 'use strict';
5 class A extends core.Object { 5 class A extends core.Object {
6 A() { 6 A() {
7 this.x = 42; 7 this.x = 42;
8 } 8 }
9 } 9 }
10 dart.setSignature(A, {}); 10 dart.setSignature(A, {});
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 this.foo = 2; 66 this.foo = 2;
67 this.bar = 3; 67 this.bar = 3;
68 } 68 }
69 } 69 }
70 dart.virtualField(Derived, 'foo'); 70 dart.virtualField(Derived, 'foo');
71 dart.setSignature(Derived, {}); 71 dart.setSignature(Derived, {});
72 let Generic$ = dart.generic(function(T) { 72 let Generic$ = dart.generic(function(T) {
73 class Generic extends core.Object { 73 class Generic extends core.Object {
74 foo(t) { 74 foo(t) {
75 dart.as(t, T); 75 dart.as(t, T);
76 return core.print(dart.notNull(Generic$().bar) + dart.notNull(t)); 76 return core.print(dart.notNull(Generic$().bar) + dart.notNull(dart.as(t, core.String)));
77 } 77 }
78 } 78 }
79 dart.setSignature(Generic, { 79 dart.setSignature(Generic, {
80 methods: () => ({foo: dart.functionType(dart.dynamic, [T])}) 80 methods: () => ({foo: dart.functionType(dart.dynamic, [T])})
81 }); 81 });
82 return Generic; 82 return Generic;
83 }); 83 });
84 let Generic = Generic$(); 84 let Generic = Generic$();
85 Generic.bar = 'hello'; 85 Generic.bar = 'hello';
86 function main() { 86 function main() {
(...skipping 11 matching lines...) Expand all
98 exports.foo = foo; 98 exports.foo = foo;
99 exports.bar = bar; 99 exports.bar = bar;
100 exports.baz = baz; 100 exports.baz = baz;
101 exports.compute = compute; 101 exports.compute = compute;
102 exports.BaseWithGetter = BaseWithGetter; 102 exports.BaseWithGetter = BaseWithGetter;
103 exports.Derived = Derived; 103 exports.Derived = Derived;
104 exports.Generic$ = Generic$; 104 exports.Generic$ = Generic$;
105 exports.Generic = Generic; 105 exports.Generic = Generic;
106 exports.main = main; 106 exports.main = main;
107 })(fieldtest, core); 107 })(fieldtest, core);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698