declare namespace A {
class Foo {}
class Bar {}
namespace Bar {
class Foo extends A.Foo {}
}
}
We have a name clash here between the two Foo classes - the one declared directly in namespace A and the other nested in a Bar class.
Dukat v0.5.0 outputs the following Kotlin code (I omit imports and file annotations here):
package A
external open class Foo
external open class Bar {
open class Foo : Foo
}
This code does not compile because of a looped inheritance hierarchy. I expect the Bar class to look like this instead:
external open class Bar {
open class Foo : A.Foo
}
I found this issue when converting TypeScript declarations for Google Maps JS API (https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/googlemaps/reference). There is a MouseEvent interface defined in google.maps namespace there and another one MouseEvent interface defined in google.maps.events that inherits from the first one. The resulting generated Kotlin code contains the same inheritance hierarchy loop for this interface.
Consider the following type declarations:
We have a name clash here between the two
Foo
classes - the one declared directly in namespace A and the other nested in aBar
class.Dukat v0.5.0 outputs the following Kotlin code (I omit imports and file annotations here):
This code does not compile because of a looped inheritance hierarchy. I expect the
Bar
class to look like this instead:I found this issue when converting TypeScript declarations for Google Maps JS API (https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/googlemaps/reference). There is a MouseEvent interface defined in
google.maps
namespace there and another one MouseEvent interface defined ingoogle.maps.events
that inherits from the first one. The resulting generated Kotlin code contains the same inheritance hierarchy loop for this interface.