Hello. I tried Kotlin/JS yesterday, but I met some...
# javascript
p
Hello. I tried Kotlin/JS yesterday, but I met some problems and I couldn't fix it. When I created a sealed class like this
Copy code
package test

sealed class Test {
    object Inner: Test()
}
and I transpiled it with jetbrains/kotlin-webpack-plugin, then I could get this code.
Copy 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')));
r
Hi there, Am I correct that for kotlin code
Copy code
package test

open class Test {
    object Inner: Test()
}
Everything works well?