mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-10 01:10:30 +00:00
cdcd82679c
CC tries to preserve sharing of objects when crossing the Lua/Java boundary. For instance, if you queue (or send over a modem) `{ tbl, tbl }`, then the returned table will have `x[1] == x[2]`. However, this sharing causes issues with Java singletons. If some code uses a singleton collection (such as List.of()) in multiple places, then the same Lua table will be used in all those locations. It's incredibly easy to accidentally, especially when using using Stream.toList. For now, we special case these collections and don't de-duplicate them. I'm not wild about this (it's a bit of a hack!), but I think it's probably the easiest solution for now. Fixes #1940 |
||
---|---|---|
.. | ||
src/main/java/dan200/computercraft/api | ||
build.gradle.kts |