-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When mapping an object with a (deep) self reference, I get a StackOverflowError.
To Reproduce
data class MyNode(
var name: String = "",
var neighbours: List<MyNode> = mutableListOf(),
)
data class NodeDto(
val name: String,
val neighbours: List<NodeDto>,
)
object Mapper : ObjectMappie<MyNode, NodeDto>()
fun main() {
val a = MyNode("a")
val b = MyNode("b")
val c = MyNode("c")
a.neighbours = listOf(b, c)
b.neighbours = listOf(a, c)
c.neighbours = listOf(a, b)
println(Mapper.map(a).neighbours)
}Expected behavior
No errors at compile-time and a working mapper.
Kotlin version
2.1.20
Mappie version
2.1.20-1.2.3
Mappie and Kotlin compatibility
yes
Invocation method
Gradle
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working