Here’s a persistable class and its weak_map:
using { /Verse.org/Simulation }
var MyClassMap:weak_map(player, my_class) = map{}
my_class := class<final><persistable>:
MyField:int = 0
^ This code compiles with no problem.
I want to use a constant to initialize my field, so I add it:
using { /Verse.org/Simulation }
MyDefaultValue:int = 0
var MyClassMap:weak_map(player, my_class) = map{}
my_class := class<final><persistable>:
MyField:int = MyDefaultValue
Now this won’t compile anymore, I get this error:
Script error 9000: Linker task graph contains a cycle:
(1,1, 1,1): Verse compiler info: Linking object '_Root'
myclass.verse(8,14, 9,34): Verse compiler info: Linking object 'my_class'
(1,1, 1,1): Verse compiler info: Linking object '_Root'
The error goes away if I remove the weak_map declaration.
Am I doing something wrong or is this a Verse bug?