Semantic Diff

#9540 Test cross-module inlining against a twin that isn't inlined

1 commit

9d227dff1ab6e95b13797358dc6ddc4a46f70886..pr-9540

9392b027b · cknitt + Claude · Dec 05, 2026, 10:16 UTC

Test cross-module inlining against a twin that isn't inlined

Why

The tests of each inlining change check its own repros. This test calls helpers twice the same way, once @inline and once @inline(never), and expects the same result. Its cases are options at payload types that can and can't be undefined (unit, nested options, Nullable, an unboxed type with an undefined case, 'a), the order of arguments with side effects, and a Some of a ref that a callback assigns after the call.

Review

  • Why only these cases? They are the ones that fail when the compiler is broken on purpose. Taking every option payload as unable to be undefined fails 10 of them, binding inlined arguments in reverse order fails the order case, and substituting any pure Some payload fails the two Some cases. Cases that failed under no such change were removed. Every @inline helper is inlined in the output, and each @inline(never) one is called.