Struct fields get reset in editor when ever the editor refreshes.

Reference ID

04fb7940-46ad-26f3-cb28-a3a8c9e75640

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

Struct fields get reset in editor when ever the editor refreshes (i.e. when ever I build verse code, launch sessions, push changes ect.). If the only thing I change in the data structure is call it a class instead of a struct, it works as expected. Also using the struct in different places less nested places seems to work as expected also.

Steps to Reproduce

here’s what I believe are the relevant parts of my code:

game_manager := class(creative_device):
    @editable
    Quest : quest = quest {}

quest := class<concrete>:
    @editable
    Tasks : []task = array{}

task := struct<concrete>:
    @editable
    ReceiveNPC : ?npc_device = false
    @editable 
    ReceiveDialog : ?dialog = false

npc_device := class<unique>(creative_device):
    @editable
    CharacterDevice : character_device = character_device {}
    @editable
    DialogDevice: popup_dialog_device =  popup_dialog_device {}
    @editable
    Name: string = "*NPC name*"
    @editable
    DefaultDialog: dialog = dialog {Dialog := "*dialog*"}

dialog := class<concrete>:
    @editable
    Dialog : string = "Default"
    @editable
    Responses : []string = array {}

When ever the editor refreshes, the ReceiveDialog field in task gets reset to ‘set to value’.
If I change the definition of the task to be a class instead of a struct like this:

task := class<concrete>:

the fields in ReceiveDialog stay field in.

also if I put a task field in game_manager I get expected result, so it’s a combination on data location and being a struct.

Expected Result

Changes to the fields should be remembered.

Observed Result

The Fields get reset in the editor to ‘set to value’

Platform(s)

windows