@@[target("rust")]

// Frame type string → Kotlin type spelling.
// Frame has NO type system: type names pass through VERBATIM
// (docs/frame_language.md). The name-alias table (str→String,
// int→Int, Any→Any?, …) was exterminated — it contradicted the
// passthrough contract. Write Kotlin's own type names.
//
// The ONE transform that remains is structural, not name-aliasing:
// Kotlin spells "no return" as `Unit`, so the framework's `void` token
// is adapted. Everything else passes through unchanged.

@@system KotlinMapType {
    interface:
        map(t: String): String

    machine:
        $Active {
            map(t: String): String {
                let result = if t == "void" {
                    "Unit".to_string()
                } else {
                    t
                };
                @@:(result)
            }
        }
}
