Skip to content

Emit boolean defaults as true or false - #145

Merged
glopesdev merged 1 commit into
harp-tech:mainfrom
glopesdev:emit-boolean-defaults
Sep 18, 2026
Merged

glopesdev merged 1 commit into
harp-tech:mainfrom
glopesdev:emit-boolean-defaults

Conversation

@glopesdev

Copy link
Copy Markdown
Contributor

A payload member or register declaring a defaultValue alongside interfaceType: bool generated a numeric literal instead of a boolean value, so the emitted property did not compile. GetDefaultValueAssignment now takes the resolved interface type and emits true or false in the case of bool.

Notes for review

This is half of #144. The other half is a boolean member that also declares a length, where the format path returns the raw expression without checking whether the member resolved to a scalar. It is a separate defect in a different code path and wants its own tests.

A payload member or register declaring a defaultValue with interfaceType
bool generated a numeric literal, so the emitted property did not
compile. The default assignment now takes the resolved interface type
and emits true or false for a boolean.
@glopesdev glopesdev added the fix Pull request that fixes an issue label Sep 18, 2026
@glopesdev
glopesdev merged commit 813ec30 into harp-tech:main Sep 18, 2026
9 checks passed
@glopesdev
glopesdev deleted the emit-boolean-defaults branch September 18, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Pull request that fixes an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants