Summary
Type variable t used only in a result position. To avoid an ambiguous type for t, ensure it is also used in an argument position.
The above error message shows that the compiler is being too restrictive.
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
# Put this type into one file
value_container(t: type) := struct {
Value: t
}
# Pet this function into another file
GetValue(ValueContainer: value_container(t) where t: type)<transacts><decides>: t = {
ValueContainer.Value
}
Expected Result
This should just work as the type is being used as part of a generic type.
Observed Result
The error messages prevents a proper API design as it forces the user to add an additional unused parameter for type information is already being transferred to the function via generic type information.
Platform(s)
UEFN (v36.20)