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

Declare methods in class merge with an interface extending another interface #255

Closed
Schahen opened this issue Apr 10, 2020 · 1 comment
Closed
Labels
compilation-failure kotlin code is generated but this code fails to be compiled

Comments

@Schahen
Copy link
Contributor

Schahen commented Apr 10, 2020

Following code:

interface StatsBase<T> {
   isFile(): boolean;

   atime: Date;
   mtime: Date;
   ctime: Date;
}

interface Stats extends StatsBase<number> {
}

declare class Stats {}

is translated to

external interface StatsBase<T> {
    fun isFile(): Boolean
    var atime: Date
    var mtime: Date
    var ctime: Date
}

external open class Stats : StatsBase<Number>

Why actually interface Stats and class Stats are merged, according to the typescript merging rules into a single class which actually Suppose to implements StatsBase, otherwise it won't compile.

@Schahen Schahen added the compilation-failure kotlin code is generated but this code fails to be compiled label Apr 10, 2020
Schahen added a commit that referenced this issue Apr 13, 2020
@Schahen
Copy link
Contributor Author

Schahen commented Sep 7, 2020

This one was fixed quite for a while

@Schahen Schahen closed this as completed Sep 7, 2020
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