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
{{ message }}
Repository navigation
A generic function used as a callable value has no type in Sema; invalid MIR (argument is Unit) #1857
with check: error only at MIR: invalid MIR before codegen: call argument 0 is Unit but the callee parameter is not. SemaCheck.check_ident returns 0 for a generic function name in value position (if self.generic_fn_node_for_symbol(sym) != 0 ...: return 0), so the argument has no type and no instantiation.
Expected
3 (instantiate identity[i32] from the expected callable type), or a Sema diagnostic naming the missing instantiation.
Workaround
Wrap it: apply((x) => identity(x), 3). Found while moving the callable-value fact to Sema (D65).
Fixed on main by 792351b (stack #2007, battery green on 0f13a62). A generic function used as a callable value is instantiated at the expected fn type; with none it is a loud error.
Activity
CK_FN constant evaluation: a function constant with no function is a …
A generic function used as a callable value is instantiated at the ex…
Sema/MIR: CK_FN loud on a missing fn (#1859); atomics default SeqCst (#…
ehartford commentedon Oct 3, 2026
Fixed on main by 792351b (stack #2007, battery green on 0f13a62). A generic function used as a callable value is instantiated at the expected fn type; with none it is a loud error.