Kotlin / Kotlin/kotlinx-nodejs

Functions with default values causes "Overload resolution ambiguity"

Open
#11 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Kotlin
Stars
224
Forks
18
PR merge metrics
No merged PRs in 30d

Description

A lot of functions have illegal overloads when default value parameter is used. e.g. `assert.assert` package:
```
external fun equal(actual: Any, expected: Any, message: String = definedExternally)
external fun equal(actual: Any, expected: Any, message: Error = definedExternally)
<...>
```
All functions with default values are unusable in this module.

Using any of them causes:
```
e: <...>: Overload resolution ambiguity:
public external fun equal(actual: Any, expected: Any, message: Error = ...): Unit defined in assert.assert
public external fun equal(actual: Any, expected: Any, message: String = ...): Unit defined in assert.assert
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the assert.assert external declarations shown in the issue and reproduce the overload resolution error with a default-valued function call. The work is done when those functions can be used without Kotlin reporting ambiguity between the Error and String overloads.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, nodejs
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.