Use fully qualified names when needed
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 591
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
Let's say we have following declarations:
/// <reference path="_referenced.d.ts" />
declare interface SomeStaticAPI {
(ping: SomeNamespace.Initializable): boolean
}
and in _referenced.d.ts suppose we have
declare namespace SomeNamespace {
interface Initializable {}
}
What happens
We'll get
external interface SomeStaticAPI {
@nativeInvoke
operator fun invoke(ping: SomeNamespace.Initializable): Boolean
}
So far so good, however this won't compile if we set explicitely qualified package name, since actually we should resolve to this:
package org.jetbrains.declaration.SomeNamespace
declare namespace SomeNamespace {
interface Initializable {}
}
package org.jetbrains.declaration
declare interface SomeStaticAPI {
(ping: org.jetbrains.declaration.SomeNamespace.Initializable): boolean
}
now it's not the case and many real-life scenarios are actually ruined by this.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the declarations in the issue as a minimal reproduction, then trace how SomeNamespace.Initializable is resolved when an explicit package is configured. Done means SomeStaticAPI refers to org.jetbrains.declaration.SomeNamespace.Initializable and the generated Kotlin declarations compile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, typescript
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100