Skip to content

test: cover printable typeof on sumtypes#26770

Open
vincenzopalazzo wants to merge 1 commit intovlang:masterfrom
vincenzopalazzo:codex/fix-26704-typeof-printable
Open

test: cover printable typeof on sumtypes#26770
vincenzopalazzo wants to merge 1 commit intovlang:masterfrom
vincenzopalazzo:codex/fix-26704-typeof-printable

Conversation

@vincenzopalazzo
Copy link
Copy Markdown
Contributor

Summary

Root cause

The original issue was a codegen regression in older compiler builds when println(typeof(step)) was used on a sumtype. The current tree no longer reproduces that failure, but there was no targeted test covering that path.

Verification

  • ./vnew -gc none -silent vlib/v/tests/typeof_test.v
  • ./vnew -g -o /tmp/issue26704_pr.c /tmp/issue26704_pr.v
  • ./vnew -gc none /tmp/issue26704_pr.v && /tmp/issue26704_pr

Fixes #26704

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.

Printing typeof() fails to compile

1 participant