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 user method colliding with §16.2a c_import sugar is lowered unchecked: MirLower ICE 'callee kind 0', no diagnostic #2403
On main (installed with v0.15.3.0-g3d03845f9) a user impl T method named like the §16.2a auto-method the translator emits for T_name(T*) is accepted by Sema with no diagnostic, and MIR then lowers the sugar's body, which Sema never checked:
BUG: call of `xdoc_root` has callee kind 0 at expression lowering: node=14322 [src/MirLower.w:17188 MirBuilder.lower_expr_node]
Two defects: (1) Sema records two methods xdoc.root (the sugar's and the user's) and neither errors nor says which wins; (2) the losing body is still lowered (a tool that stayed silent: MIR lowers a body Sema never checked). Expected: either the user's method shadows the sugar (sugar is presentation, §16.2a, and may be omitted) with the sugar decl dropped before lowering, or a diagnostic naming the collision. Found while implementing D122 record-view hosts (the facade's impl xnode collided with the sugar; the D122 branch suppresses the sugar on view types through ci_set_no_methods).
Fixed on main by 2396bc9 (PR #2651, stack #2658; battery green on the stack top 48c1c72). The commit message names the root-cause line and the regression test.
Activity
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): reproduced.pre-release: an internal error from an ordinary method name on a C type; Sema should report the collision.
c_import: a method c_import generates for a C type yields to a writte…
ehartford commentedon Oct 25, 2026
Fixed on main by 2396bc9 (PR #2651, stack #2658; battery green on the stack top 48c1c72). The commit message names the root-cause line and the regression test.