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

Override is not resolved correctly for classes with generic parents that are narrowed down #281

Closed
Schahen opened this issue May 6, 2020 · 0 comments
Labels
compilation-failure kotlin code is generated but this code fails to be compiled

Comments

@Schahen
Copy link
Contributor

Schahen commented May 6, 2020

This is a strikingly simple example of something that is broken:

interface Base<T> {
  ping(o: T);
}

declare class App implements Base<number> {
  ping(o: number);
}

will be translated to:

external interface Base<T> {
    fun ping(o: T)
}

external open class App : Base<Number> {
    open fun ping(o: Number)
}

while App::ping actually should have override

@Schahen Schahen added the compilation-failure kotlin code is generated but this code fails to be compiled label May 6, 2020
Schahen added a commit that referenced this issue May 6, 2020
this fixes #280

keep in mind that in compiler/test/data/typescript/mergeDeclarations/withSpecifiedTypeParams/interfaceWithClass.d.ts
Stats::ping actually should have override modifier. But this is just the
way it is right not and covered in #281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compilation-failure kotlin code is generated but this code fails to be compiled
Projects
None yet
Development

No branches or pull requests

1 participant