Summary
The following snippet compiles & works just fine on functions within my project but gives compile errors when using methods from modules outside of the project (ie /Verse.org/ or /Fortnite.com/)
(Function:type{_(:args):retval} where args:type, retval:type).CallIn<public>(Seconds:float, Args:args):task(retval)=
return spawn:
Function.DelayCall(Seconds, Args)
(Function:type{_(:args):retval} where args:type, retval:type).DelayCall<internal>(Seconds:float, Args:args)<suspends>:retval=
Sleep(Seconds)
Result := Func(Args)
return Result
return Result
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
granter_wrapper <public> := class<concrete>:
@editable Granter : item_granter_device = item_granter_device{}
GrantItem(Agent:agent):void=
Granter.GrantItem(Agent)
repro := class<public>(creative_device):
@editable Granter : item_granter_device = item_granter_device{}
@editable GranterWrapper : granter_wrapper = granter_wrapper{}
OnBegin<override>()<suspends>:void=
for(Player:GetPlayspace().GetPlayers()):
Granter.GrantItem.CallIn(1.0, Player) # <- will give compile error
GranterWrapper.GrantItem.CallIn(1.0, Player) # <- Compiles / Works Fine.
Expected Result
Code to compile
Observed Result
I get the following compile error when using this extension method on methods from external modules.
#Using a value of type type{_(:args->retval,:tuple(args,float) where args,retval):task(retval)} as a value of type tuple(agent->any,tuple(agent,float))->task(void) is not yet implemented.
Platform(s)
Windows