Kotlin / Kotlin/dataframe

Compiler plugin generated local types from `@Composable` lambdas don't work

Open
#1,604 2 comments 0 reactions 1 assignee Claimed by @koperagen View on GitHub
bug Compiler plugin documentation
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

Image

The error reads `'val DataRow.age2: Int' cannot be called in this context with an implicit receiver. Use an explicit receiver if necessary.` Unfortunately, the only way to fix it seems to be moving it outside the lambda body.

To reproduce:

```kt
@DataSchema
data class Person(val age: Int, val name: String)

@Composable
fun DataFrameScreen(df: DataFrame) {
val a = df
.add("age2") { age }
.filter { age2 >= 20 }
a.age
a.age2

Column {
val b = df
.add("age2") { age }
.filter { age2 >= 20 }
b.age
b.age2
a.age
a.age2
}
}
```

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.