Skip to content

Add failing test for #9349#9354

Open
niclas-ahden wants to merge 1 commit intoroc-lang:mainfrom
niclas-ahden:test-expect-type-error-codegen-panic
Open

Add failing test for #9349#9354
niclas-ahden wants to merge 1 commit intoroc-lang:mainfrom
niclas-ahden:test-expect-type-error-codegen-panic

Conversation

@niclas-ahden
Copy link
Copy Markdown
Contributor

Add failing test for #9349 as per Zulip thread. This looks good to me, but I'd appreciate any feedback so that I can bring that into the future ones I'll create as well :)

…pect

Top-level `expect foo(Dynamite) == 5` where the argument is ill-typed
turns into a `runtime_error` LIR node; LIR codegen of the surrounding
`num_is_eq` then calls `exprLayout` on it and panics with
"LIR/codegen invariant violated: exprLayout called on non-value
expression runtime_error". The same expression inside `main!` reports
the type mismatch cleanly, so the bug is specific to `expect` codegen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant