-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Compiler plugin] Fix toDataFrame for different visibilities
- Loading branch information
Showing
5 changed files
with
81 additions
and
3 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
20 changes: 20 additions & 0 deletions
20
plugins/kotlin-dataframe/testData/box/toDataFrame_local_class.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,20 @@ | ||
import org.jetbrains.kotlinx.dataframe.* | ||
import org.jetbrains.kotlinx.dataframe.annotations.* | ||
import org.jetbrains.kotlinx.dataframe.api.* | ||
import org.jetbrains.kotlinx.dataframe.io.* | ||
|
||
fun box(): String { | ||
data class Name(val firstName: String, val lastName: String) | ||
|
||
data class Score(val subject: String, val value: Int) | ||
|
||
data class Student(val name: Name, val age: Int, val scores: List<Score>) | ||
|
||
val students = listOf( | ||
Student(Name("Alice", "Cooper"), 15, listOf(Score("math", 4), Score("biology", 3))), | ||
Student(Name("Bob", "Marley"), 20, listOf(Score("music", 5))), | ||
).toDataFrame() | ||
|
||
students.compareSchemas(strict = true) | ||
return "OK" | ||
} |
20 changes: 20 additions & 0 deletions
20
plugins/kotlin-dataframe/testData/box/toDataFrame_private_class.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,20 @@ | ||
import org.jetbrains.kotlinx.dataframe.* | ||
import org.jetbrains.kotlinx.dataframe.annotations.* | ||
import org.jetbrains.kotlinx.dataframe.api.* | ||
import org.jetbrains.kotlinx.dataframe.io.* | ||
|
||
private data class Name(val firstName: String, val lastName: String) | ||
|
||
private data class Score(val subject: String, val value: Int) | ||
|
||
private data class Student(val name: Name, val age: Int, val scores: List<Score>) | ||
|
||
fun box(): String { | ||
val students = listOf( | ||
Student(Name("Alice", "Cooper"), 15, listOf(Score("math", 4), Score("biology", 3))), | ||
Student(Name("Bob", "Marley"), 20, listOf(Score("music", 5))), | ||
).toDataFrame() | ||
|
||
students.compareSchemas(strict = true) | ||
return "OK" | ||
} |
20 changes: 20 additions & 0 deletions
20
plugins/kotlin-dataframe/testData/box/toDataFrame_private_properties.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,20 @@ | ||
import org.jetbrains.kotlinx.dataframe.* | ||
import org.jetbrains.kotlinx.dataframe.annotations.* | ||
import org.jetbrains.kotlinx.dataframe.api.* | ||
import org.jetbrains.kotlinx.dataframe.io.* | ||
|
||
data class Name(val firstName: String, val lastName: String) | ||
|
||
data class Score(val subject: String, val value: Int) | ||
|
||
data class Student(private val name: Name, private val age: Int, val scores: List<Score>) | ||
|
||
fun box(): String { | ||
val students = listOf( | ||
Student(Name("Alice", "Cooper"), 15, listOf(Score("math", 4), Score("biology", 3))), | ||
Student(Name("Bob", "Marley"), 20, listOf(Score("music", 5))), | ||
).toDataFrame() | ||
|
||
students.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