Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated Kotlin code for language-server doesn't compile #516

Open
PascalHonegger opened this issue Mar 9, 2023 · 0 comments
Open

Generated Kotlin code for language-server doesn't compile #516

PascalHonegger opened this issue Mar 9, 2023 · 0 comments

Comments

@PascalHonegger
Copy link

🕗 Version

0.5.8-rc.4

💻 Code or Package Name

[email protected]

🙁 Actual behavior

Many compile errors within generated Kotlin code from TypeScript delcaration, here are some example code snippets which were generated:

@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") // ERROR: This annotation is not repeatable
external interface RAL {
    var applicationJson: `T$3`
    var messageBuffer: `T$4`
    var console: `T$5`
    var timer: `T$6`

    companion object {
        fun install(ral: RAL)
    }
}
import `_` // ERROR: Names _, __, ___, ..., are reserved in Kotlin
external open class CancellationTokenSource : AbstractCancellationTokenSource {
    open var _token: Any // ERROR: should be "token: CancellationToken" like in the interface
    override fun cancel()
    override fun dispose()
}
package TraceFormat // ERROR: Redeclaration: TraceFormat

🙂 Expected behavior

Generated Kotlin types compile

@PascalHonegger PascalHonegger changed the title Please, highlight the essence of the problem in the title Generated Kotlin code for la language-server doesn't compile Mar 9, 2023
@PascalHonegger PascalHonegger changed the title Generated Kotlin code for la language-server doesn't compile Generated Kotlin code for language-server doesn't compile Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant