This repository was archived by the owner on Jan 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Sealed interface not supportedΒ #38
Copy link
Copy link
Open
Description
package ynab.slik.data.repository
import deezer.kustomexport.KustomExport
@KustomExport
sealed interface InvalidDataError
@KustomExport
class InvalidNumber(val number: Int) : InvalidDataError
@KustomExport
class InvalidName(val name: String) : InvalidDataErrorThis fails to compile:
> Task :lib:compileKotlinJs FAILED
e: file:///Users/graham/Work/YNAB/slik/lib/build/generated/ksp/js/jsMain/kotlin/ynab/slik/data/repository/js/InvalidDataError.kt:11:5 Inheritance of sealed classes or interfaces from different module is prohibited
e: file:///Users/graham/Work/YNAB/slik/lib/build/generated/ksp/js/jsMain/kotlin/ynab/slik/data/repository/js/InvalidDataError.kt:11:5 Inheritor of sealed class or interface declared in package ynab.slik.data.repository.js but it must be in package ynab.slik.data.repository where base class is declared
FAILURE: Build failed with an exception.
If I change the sealed interface to sealed class, then it works.
package ynab.slik.data.repository
import deezer.kustomexport.KustomExport
@KustomExport
sealed class InvalidDataError
@KustomExport
class InvalidNumber(val number: Int) : InvalidDataError()
@KustomExport
class InvalidName(val name: String) : InvalidDataError()n8ebel
Metadata
Metadata
Assignees
Labels
No labels