Index: test/codegen/expect/fields.js |
diff --git a/test/codegen/expect/fields.js b/test/codegen/expect/fields.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..085075661f21aec6da963a7d92e85ea9f314c7c7 |
--- /dev/null |
+++ b/test/codegen/expect/fields.js |
@@ -0,0 +1,115 @@ |
+var fields; |
+(function(exports) { |
+ 'use strict'; |
+ // Function init: (dynamic) → dynamic |
+ function init(x) { |
+ core.print(x); |
+ return x; |
+ } |
+ let x = Symbol('x'); |
+ class Base extends core.Object { |
+ Base() { |
+ this[x] = init('Base.x'); |
+ } |
+ get x() { |
+ return this[x]; |
+ } |
+ set x(value) { |
+ this[x] = value; |
+ } |
+ } |
+ let x$ = Symbol('x'); |
+ class Mixin1 extends core.Object { |
+ Mixin1() { |
+ this[x$] = init('Mixin1.x'); |
+ } |
+ get x() { |
+ return this[x$]; |
+ } |
+ set x(value) { |
+ this[x$] = value; |
+ } |
+ } |
+ let x$0 = Symbol('x'); |
+ class Mixin2 extends core.Object { |
+ Mixin2() { |
+ this[x$0] = init('Mixin2.x'); |
+ } |
+ get x() { |
+ return this[x$0]; |
+ } |
+ set x(value) { |
+ this[x$0] = value; |
+ } |
+ } |
+ let x$1 = Symbol('x'); |
+ class Derived extends dart.mixin(Base, Mixin1, Mixin2) { |
+ Derived() { |
+ this[x$1] = init('Derived.x'); |
+ super.Base(); |
+ } |
+ get x() { |
+ return this[x$1]; |
+ } |
+ set x(value) { |
+ this[x$1] = value; |
+ } |
+ } |
+ class _Base extends core.Object { |
+ _Base() { |
+ this.x = init('_Base.x'); |
+ } |
+ } |
+ let _x = Symbol('_x'); |
+ let _x$ = Symbol('_x'); |
+ class _Mixin1 extends core.Object { |
+ _Mixin1() { |
+ this[_x] = init('_Mixin1.x'); |
+ } |
+ get [_x$]() { |
+ return this[_x]; |
+ } |
+ set [_x$](value) { |
+ this[_x] = value; |
+ } |
+ } |
+ let _x$0 = Symbol('_x'); |
+ class _Mixin2 extends core.Object { |
+ _Mixin2() { |
+ this[_x$0] = init('_Mixin2.x'); |
+ } |
+ get [_x$]() { |
+ return this[_x$0]; |
+ } |
+ set [_x$](value) { |
+ this[_x$0] = value; |
+ } |
+ } |
+ let _x$1 = Symbol('_x'); |
+ class _Derived extends dart.mixin(_Base, _Mixin1, _Mixin2) { |
+ _Derived() { |
+ this[_x$1] = init('_Derived.x'); |
+ super._Base(); |
+ } |
+ get [_x$]() { |
+ return this[_x$1]; |
+ } |
+ set [_x$](value) { |
+ this[_x$1] = value; |
+ } |
+ } |
+ // Function main: () → dynamic |
+ function main() { |
+ core.print('Creating Derived'); |
+ core.print('Derived.x == ' + dart.notNull(new Derived().x)); |
+ core.print('Creating _Derived'); |
+ core.print('_Derived.x == ' + dart.notNull(new _Derived()[_x$])); |
+ } |
+ // Exports: |
+ exports.init = init; |
+ exports.Base = Base; |
+ exports.Mixin1 = Mixin1; |
+ exports.Mixin2 = Mixin2; |
+ exports.Derived = Derived; |
+ exports.main = main; |
+})(fields || (fields = {})); |