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
Repro (flip probe, branch 747-flip @ 01c8248; E1102 shape also doubles on the installed main-world compiler)
type Zqx { s: str }
impl Copy for Zqx
fn main:
print("x")
check renders the SAME diagnostic twice, byte-identical spans:
error: type 'Zqx' cannot implement Copy: field 's' is not Copy
--> dblrender.w:2:1
error: type 'Zqx' cannot implement Copy: field 's' is not Copy
--> dblrender.w:2:1
error: check failed during compilation
Same doubling for duplicate implementation of trait for type [E1102] (that shape reproduces on the current installed main-world with too, via the #750 RegexFlags collision repro). Body/expression-level errors (undefined variable, type mismatch in binding) render ONCE — the doubling is specific to the declaration/impl-validation phase, which evidently runs twice and emits both times without dedupe.
Fixed: DiagnosticList.emit drops exact duplicates (severity + message + primary span + code). Root cause at the exact line: ComptimeTransform.w builds transform_sema seeded with the shared diags, runs prepare_for_comptime_transform() (declaration collection emits E1102/Copy-impl errors), hands the diags back — then check_module() runs the same collection again on the main sema into the same list. Insert-time dedup fixes the class: the same words at the same node re-derived by a later pass is one diagnostic. Distinct duplicates (two different dup-impl sites) still render individually; full :test green including every expected-error lane.
Activity
docs: handoff 04o — #747 check-scale i32 overflow fixed (fn_param_def…
ehartford commentedon Aug 31, 2026
Fixed: DiagnosticList.emit drops exact duplicates (severity + message + primary span + code). Root cause at the exact line: ComptimeTransform.w builds transform_sema seeded with the shared diags, runs prepare_for_comptime_transform() (declaration collection emits E1102/Copy-impl errors), hands the diags back — then check_module() runs the same collection again on the main sema into the same list. Insert-time dedup fixes the class: the same words at the same node re-derived by a later pass is one diagnostic. Distinct duplicates (two different dup-impl sites) still render individually; full :test green including every expected-error lane.
diagnostics: identical re-derived diagnostics render once (#759)