Kotlin / Kotlin/dataframe

Verify and document ApiLevels.kt type inference failure in samples

Open
#732 4 comments 0 reactions 1 assignee Claimed by @Allex-Nik View on GitHub
bug
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

### Title

Verify and document ApiLevels.kt type inference failure in samples

### Problem

The issue reports a compilation failure when running tests:

`Not enough information to infer type variable R`

The failure occurs in `ApiLevels.kt` in multiple locations within sample code.

### Current status

The issue is marked as not reproducible, but the original report includes:
- file name (`ApiLevels.kt`)
- exact error message
- locations in sample code

This suggests it may have been tied to a specific state of the codebase or already fixed.

### Expected

Verify whether this type inference issue still exists in current samples.

### Acceptance criteria

- Confirm whether `ApiLevels.kt` compiles successfully in current codebase
- If the issue is no longer reproducible:
- close with confirmation
- If reproducible:
- identify root cause
- fix or adjust sample code
- Ensure all sample code compiles without type inference errors

### Motivation

Sample code is used as documentation.

Compilation failures in samples reduce trust and may indicate issues in API usage. Before 1.0, all samples should either compile correctly or outdated reports should be resolved explicitly.

I got exception while running tests (master branch [1a818ca](https://github.com/Kotlin/dataframe/commit/1a818ca7de494948ecdbedbc49958f75a1d7c48d)) : Not enough information to infer type variable R

In ApiLevels.kt:
- https://github.com/Kotlin/dataframe/blob/1a818ca7de494948ecdbedbc49958f75a1d7c48d/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/ApiLevels.kt#L25:14
- https://github.com/Kotlin/dataframe/blob/1a818ca7de494948ecdbedbc49958f75a1d7c48d/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/ApiLevels.kt#L25:60
- https://github.com/Kotlin/dataframe/blob/1a818ca7de494948ecdbedbc49958f75a1d7c48d/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/ApiLevels.kt#L133:12
- https://github.com/Kotlin/dataframe/blob/1a818ca7de494948ecdbedbc49958f75a1d7c48d/core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/ApiLevels.kt#L133:46

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.