All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.co.touchlab.skie.sir.element.SirEnumCaseAssociatedValue.kt Maven / Gradle / Ivy

Go to download

Kotlin compiler plugin that improves Swift interface of a Kotlin Multiplatform framework.

The newest version!
package co.touchlab.skie.sir.element

import co.touchlab.skie.sir.element.util.sirEnumCaseAssociatedValueParent
import co.touchlab.skie.sir.type.SirType

class SirEnumCaseAssociatedValue(
    var type: SirType,
    parent: SirEnumCase,
) : SirElement {

    var parent: SirEnumCase by sirEnumCaseAssociatedValueParent(parent)

    override fun toString(): String = "${this::class.simpleName} of $parent: $type"

    companion object {

        context(SirEnumCase)
        operator fun invoke(
            type: SirType,
        ): SirEnumCaseAssociatedValue =
            SirEnumCaseAssociatedValue(
                type = type,
                parent = this@SirEnumCase,
            )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy