UEFN - editor crash when Verse script for a nested parametric type

when I build the following code and build on UEFN, so UEFN crashed.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

class4(t : type) := class:
    Property : ?t

    Flatten(X:?class4(t2) where t2:type):?t2 =
        if (Y := X):
            Y.Property
        else:
            false

hello_world_device := class(creative_device):
    OnBegin<override>()<suspends>:void=
        X := class4(int){Property := option{1}}
        Flatten(option{X}) = X.Property

This code is a modification of what was in the documentation so that it can be built.

At the time I wrote the above code, I received an error message on VSCode as shown in the image
0429_2

Thanks for the report; I’ve reproduced the crash and filed a bug.

The problem is due to the Flatten function being a member of class4. In the example in the docs, it is a module-scoped function, and the compiler doesn’t crash for that. I recommend doing that until we are able to fix the bug.

1 Like

I checked that code and understood it. Thank you very much.