Semantic Diff

#9110 Fill generated switch cases with %todo instead of the removed failwith

1 commit

85f31fbb15ef96bd168d6e99055ad4808810d6e0..pr-9110

f6de2bb5b · cknitt + Claude · Oct 28, 2026, 15:22 UTC

Fill generated switch cases with %todo

Why

The exhaustive-switch and add-missing-cases code actions filled new cases with failwith("TODO"), but #9052 removed failwith, so the generated code no longer compiled. They now use %todo, as the exhaustive-switch completion already does.

modifiedFormat code action output

let f = (x: option<int>) => switch x { | Some(_) => 1 }
rescript
Before
After
switch x {switch x {| None => failwith("TODO")| None => %todo| Some(_) => 1| Some(_) => 1}}

The deprecated-let changelog fragment no longer says that failwith and invalid_arg warn, since they are removed.