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
/tmp/v_501/core_v.01HTDW22W7WKSQ5Q8XPN9GNMEG.tmp.c:23570:9: error: initializing 'string' (aka 'struct string') with an expression of incompatible type '_result_string (*)()' (aka 'struct _result_string (*)()')
string server_script_path =
^
/tmp/v_501/core_v.01HTDW22W7WKSQ5Q8XPN9GNMEG.tmp.c:23571:5: error: expected ';' at end of declaration
_t5 _result_string _t6 = __closure_create(anon_fn_143c1662f75e5a6c___result_string_1704, (struct _V_anon_fn_143c1662f75e5a6c___result_string_1704_Ctx*) memdup_uncollectable(&(struct _V_anon_fn_143c1662f75e5a6c___result_string_1704_Ctx){.tmp_wd = tmp_wd,
^
;
/tmp/v_501/core_v.01HTDW22W7WKSQ5Q8XPN9GNMEG.tmp.c:23572:74: error: called object type 'void *' is not a function or function pointer
}, sizeof(struct _V_anon_fn_143c1662f75e5a6c___result_string_1704_Ctx)))();
spytheman
changed the title
Inline function called instantly with an or block fails to compile
a closure called instantly with an or block fails to compile
Apr 5, 2024
Describe the bug
Trying to inline a function with an
Option
return which is invoked immediately results in a compilation error when using anor
block.Reproduction Steps
The following code results in the described bug behavior:
Expected Behavior
I would expect this to compile without issue.
Current Behavior
Does not compile:
The following does however compiler:
Possible Solution
No response
Additional Information/Context
No response
V version
0.4.5 e6b43a1
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: