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
ICE: a user type named Result breaks std generic instantiation (f64.parse_text contract) #2758
Declaring a user type named Result ICEs the compiler instead of compiling (or erroring in std the way type Option does, #750):
type Result = i32
fn main:
let x: Result = 3
print(x)
BUG: user generic call lacks a concrete contract: body=209(f64.parse_text) call=2 node=2181 sig=-1 mono=0 [src/MirLower.w:19522 MirModule.validate_generic_call_contracts]
Reproduced 2026-10-26 on the installed compiler reseeded from ec88cbcbf (with v0.15.3.0). The body named is from str.parse (#959, merged this week), so this may be a fresh exposure of the #750 flat-name lookup (the compiler resolving Result — or Option, via parse_text's return type — to the user's declaration while instantiating std generics) rather than a separate defect. Filed separately per the #750 ruling so the ICE is tracked even if the fix turns out to be the same one-line-owner change; close as a duplicate of the #750 fix if so.
Related matrix (same session): type Regex = i32 works; type Option { a: i32 } and type Option = i32 fail inside <embedded-std>/std/string.w:519 ("? operator requires an Option, Result, or a type implementing Try").
Fixed by #2763 (6126049), the #750 template-identity fix: the ICE was the same flat-map displacement (a user type Result = i32 became the template std's generic machinery instantiated). Regression: test/behavior/behav_750_user_result_shadows_std.w. Battery-green on 4062c27.
Activity
fix 750 (#2763)
ehartford commentedon Oct 28, 2026
Fixed by #2763 (6126049), the #750 template-identity fix: the ICE was the same flat-map displacement (a user
type Result = i32became the template std's generic machinery instantiated). Regression: test/behavior/behav_750_user_result_shadows_std.w. Battery-green on 4062c27.