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
error: expected type 'fn(type) bool', found 'fn(type)var'
This appears to be because of the kind of type-erasure zig performs as a result of being able to do things like this fn func(comptime T: type, x: T) T, where any type after the first generic (or type) argument could be inferred. Since var does not work as a return type (#447), the only way around this is to return the Closure struct, itself a workaround for the inability to nest functions directly within other functions (#229), and take the Fn at the callsite:
This appears to be because of the kind of type-erasure zig performs as a result of being able to do things like this
fn func(comptime T: type, x: T) T
, where any type after the first generic (or type) argument could be inferred. Sincevar
does not work as a return type (#447), the only way around this is to return theClosure
struct, itself a workaround for the inability to nest functions directly within other functions (#229), and take the Fn at the callsite:The text was updated successfully, but these errors were encountered: