Kotlin / Kotlin/dukat

Rename function parameter, if it named this

Open
#3 4 comments 0 reactions 0 assignees View on GitHub
compilation-failure
Dominant language
Kotlin
Stars
591
Forks
40
PR merge metrics
No merged PRs in 30d

Description

```typescript
export declare class SomeClass {
static foo(this: OtherClass, entity: T): any;
}
```
produce:
```kotlin
external open class SomeClass {
companion object {
fun foo(this: OtherClass, entity: T): Any = definedExternally
} // ^
} // Error: Parameter name expected
```
It could be `thisRef:`, for example

Contributor guide

No contributing guide indexed for this repository

Research direction

Start from the TypeScript declaration shown in the issue and trace how the converter names the generated Kotlin parameter for an explicit `this` parameter. Verify the generated declaration uses a valid parameter name such as `thisRef` and that the resulting Kotlin output compiles.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.