plavelo
01/09/2019, 12:29 AMpackage test
sealed class Test {
object Inner: Test()
}
and I transpiled it with jetbrains/kotlin-webpack-plugin, then I could get this code.
(function (_, Kotlin) {
'use strict';
var Kind_OBJECT = Kotlin.Kind.OBJECT;
var Kind_CLASS = Kotlin.Kind.CLASS;
Test$Inner.prototype = Object.create(Test.prototype);
Test$Inner.prototype.constructor = Test$Inner;
function Test() {
}
function Test$Inner() {
Test$Inner_instance = this;
Test.call(this);
}
Test$Inner.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'Inner',
interfaces: [Test]
};
var Test$Inner_instance = null;
function Test$Inner_getInstance() {
if (Test$Inner_instance === null) {
new Test$Inner();
}
return Test$Inner_instance;
}
Test.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'Test',
interfaces: []
};
Object.defineProperty(Test, 'Inner', {
get: Test$Inner_getInstance
});
var package$test = _.test || (_.test = {});
package$test.Test = Test;
Kotlin.defineModule('english', _);
return _;
}(module.exports, require('kotlin')));
Roman Artemev [JB]
01/09/2019, 1:26 PMpackage test
open class Test {
object Inner: Test()
}
Everything works well?