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

Usages of generated classes in namespaces with package strategy are not adopted #25

Open
Vampire opened this issue Sep 17, 2024 · 0 comments

Comments

@Vampire
Copy link
Contributor

Vampire commented Sep 17, 2024

If you apply

diff --git a/test/functional/namespace/lib/index.d.ts b/test/functional/namespace/lib/index.d.ts
index 1588f47..6b6f38b 100644
--- a/test/functional/namespace/lib/index.d.ts
+++ b/test/functional/namespace/lib/index.d.ts
@@ -3,12 +3,14 @@ declare module "package-namespace" {

     function testFn(param: string): string
     function testFn(param: number): string
+    function testFn(param: NestedNamespace.IdentifierBase): string

     interface TestInterface {
         testFn: typeof testFn
     }

     namespace NestedNamespace {
+        type IdentifierBase = "0" | "1"
         const nestedNamespaceValue: number
     }

you get
test/functional/namespace/generated/package/namespace/nestednamespace/IdentifierBase.kt with package `package`.namespace.nestednamespace which is perfectly fine and expected.
But in test/functional/namespace/generated/package/namespace/testFn.kt you get external fun testFn(param: NestedNamespace.IdentifierBase): String which will not compile, as you cannot use a relative package name of course.

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