Kotlin / Kotlin/multik

Usage of unsupported type causes runtime error

Open
#177 1 comment 0 reactions 0 assignees View on GitHub
api bug
Dominant language
Kotlin
Stars
734
Forks
51
Avg merge
9h 52m
Merged PRs (30d)
6

Description

The following code will compile, but cause the runtime error because inferred type is Number which is unsupported.
`val b = mk.ndarray(mk[1.0, 2])`. Considering current library design, is it possible to move this check to compile time? Maybe numbers should be treated as Double?

Contributor guide

Open the contributing guide

Research direction

Start with the `mk.ndarray(mk[1.0, 2])` example and trace how the inferred `Number` type is validated at runtime. Compare compile-time rejection with treating numeric values as `Double`, then define and test the chosen behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.