You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an example simplified down from a case in which I wanted to use haxe-concurrent to perform a task, and then query the time at which it was completed once it finished.
Here, I have a valid case for using Void as the parameter of PromiseResult, but encounter the issue where I cannot access getResult().time because extracting the enum values requires a variable be assigned to a Void type, even if it is unused (as indicated by assigning it to _).
Switching from Void to typedef NoValue = {} would be annoying as then I would have to make every task I provide to the task executor return an empty value.
Should assigning _ to Void specifically be allowed, or is that too strange of a behavior? There is also the question of whether using Void as the type parameter of an enum is even valid in the first place.
The text was updated successfully, but these errors were encountered:
Example: https://try.haxe.org/#F28DdCCc
This is an example simplified down from a case in which I wanted to use
haxe-concurrent
to perform a task, and then query the time at which it was completed once it finished.Here, I have a valid case for using
Void
as the parameter ofPromiseResult
, but encounter the issue where I cannot accessgetResult().time
because extracting the enum values requires a variable be assigned to a Void type, even if it is unused (as indicated by assigning it to_
).Switching from
Void
totypedef NoValue = {}
would be annoying as then I would have to make every task I provide to the task executor return an empty value.Should assigning
_
to Void specifically be allowed, or is that too strange of a behavior? There is also the question of whether usingVoid
as the type parameter of an enum is even valid in the first place.The text was updated successfully, but these errors were encountered: