Skip to content
Discussion options

You must be logged in to vote

Hmm that's a somewhat surprising error. I'd need to investigate a bit deeper to figure out if it's a bug.

That said, this works:

local const scalaTestModule: ScalaTestModule = (baseModule.toDynamic().toTyped(ScalaTestModule)) {
  id = "uber-test-module"
}

You could even make this more convenient:

abstract class DederModule {
  id: String

  fixed asScala: ScalaModule = this.toDynamic().toTyped(ScalaModule)
}

open class ScalaModule extends DederModule {
  fixed asTest: ScalaTestModule = this.toDynamic().toTyped(ScalaTestModule)
}

class ScalaTestModule extends ScalaModule {}

local const baseModule: ScalaModule = new {}
local const scalaModule = (baseModule) { id = "base-module" }

local c…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sake92
Comment options

@HT154
Comment options

HT154 Feb 6, 2026
Maintainer

Answer selected by sake92
@sake92
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants