JS backend: fix KotlinLibTest
This commit is contained in:
@@ -14,11 +14,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var foo = Kotlin.definePackage({initialize: function () {
|
var foo = Kotlin.defineRootPackage(null, {
|
||||||
}, box: function () {
|
box: function () {
|
||||||
return !false;
|
return !false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
return foo.box()
|
return foo.box()
|
||||||
|
|||||||
@@ -16,40 +16,41 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
var items = function () {
|
var items = function () {
|
||||||
var A = Kotlin.createClass(null, {initialize: function () {
|
var A = Kotlin.createClass(null,
|
||||||
this.$order = '';
|
function $fun() {
|
||||||
|
this.$order = '';
|
||||||
|
{
|
||||||
|
this.set_order(this.get_order() + 'A');
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
this.set_order(this.get_order() + 'A');
|
set_order: function (tmp$0) {
|
||||||
}
|
this.$order = tmp$0;
|
||||||
}, set_order: function (tmp$0) {
|
},
|
||||||
this.$order = tmp$0;
|
get_order: function () {
|
||||||
}, get_order: function () {
|
return this.$order;
|
||||||
return this.$order;
|
}
|
||||||
}
|
});
|
||||||
});
|
var B = Kotlin.createClass(A, function $fun() {
|
||||||
var B = Kotlin.createClass(A, {initialize: function () {
|
$fun.baseInitializer.call(this);
|
||||||
this.super_init();
|
|
||||||
{
|
{
|
||||||
this.set_order(this.get_order() + 'B');
|
this.set_order(this.get_order() + 'B');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
var C = Kotlin.createClass(B, {initialize: function () {
|
var C = Kotlin.createClass(B, function $fun() {
|
||||||
this.super_init();
|
$fun.baseInitializer.call(this);
|
||||||
{
|
{
|
||||||
this.set_order(this.get_order() + 'C');
|
this.set_order(this.get_order() + 'C');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return {A: A, B: B, C: C};
|
return {A: A, B: B, C: C};
|
||||||
}
|
}();
|
||||||
();
|
|
||||||
|
|
||||||
items.box = function () {
|
items.box = function () {
|
||||||
return (new foo.C).get_order() === 'ABC' && (new foo.B).get_order() === 'AB' && (new foo.A).get_order() === 'A';
|
return (new foo.C).get_order() === 'ABC' && (new foo.B).get_order() === 'AB' && (new foo.A).get_order() === 'A';
|
||||||
};
|
};
|
||||||
|
|
||||||
var foo = Kotlin.definePackage(items);
|
var foo = Kotlin.defineRootPackage(null, items);
|
||||||
}
|
}
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
|
|||||||
Reference in New Issue
Block a user