-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Compiler plugin] Use resolved type argument T of Iterable<T>.toDataF…
…rame() _call_ instead of one from the return type of receiver *iterable*.toDataFrame()
- Loading branch information
Showing
4 changed files
with
70 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
plugins/kotlin-dataframe/testData/box/toDataFrame_customIterable.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import org.jetbrains.kotlinx.dataframe.* | ||
import org.jetbrains.kotlinx.dataframe.annotations.* | ||
import org.jetbrains.kotlinx.dataframe.api.* | ||
import org.jetbrains.kotlinx.dataframe.io.* | ||
|
||
@DataSchema | ||
data class D( | ||
val s: String | ||
) | ||
|
||
class Subtree( | ||
val p: Int, | ||
val l: List<Int>, | ||
val ld: List<D>, | ||
) | ||
|
||
class Root(val a: Subtree) | ||
|
||
class MyList(val l: List<Root?>): List<Root?> by l | ||
|
||
fun box(): String { | ||
val l = listOf( | ||
Root(Subtree(123, listOf(1), listOf(D("ff")))), | ||
null | ||
) | ||
val df = MyList(l).toDataFrame(maxDepth = 2) | ||
df.compareSchemas(strict = true) | ||
return "OK" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters