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

Illegal dynamic TypeAlias occurs under specific circumstances #372

Closed
Schahen opened this issue Aug 17, 2020 · 0 comments
Closed

Illegal dynamic TypeAlias occurs under specific circumstances #372

Schahen opened this issue Aug 17, 2020 · 0 comments
Labels
compilation-failure kotlin code is generated but this code fails to be compiled domain:typealias
Milestone

Comments

@Schahen
Copy link
Contributor

Schahen commented Aug 17, 2020

Following code

declare namespace Search {
  type MetadataSettings = Settings.Param;

  namespace Settings {
    type Param = (Pick<_Impl, 'cache'> |
      Pick<_Impl, 'results'>) &
      Partial<Pick<_Impl, keyof _Impl>>;

    interface _Impl {
      cache: string;
      results: string;
    }
  }
}

is translated to:

// [test] nonDeclarations.Search.kt

typealias MetadataSettings = dynamic

// ------------------------------------------------------------------------------------------
// [test] aaa.Search.Settings.kt
package Search.Settings

external interface _Impl {
    var cache: String
    var results: String
}

While actually we expect typealias to be gone completely

@Schahen Schahen added compilation-failure kotlin code is generated but this code fails to be compiled domain:typealias labels Aug 17, 2020
@Schahen Schahen added this to the 0.5.8 milestone Aug 17, 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 domain:typealias
Projects
None yet
Development

No branches or pull requests

1 participant