Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wit/bindgen: do not use bool for result or variant shapes #286

Merged
merged 7 commits into from
Jan 27, 2025
Merged

Conversation

ydnar
Copy link
Collaborator

@ydnar ydnar commented Jan 20, 2025

TinyGo (LLVM, presumably) will return a cm.Result[bool, bool, int8] with the payload type constrained to a bool, either 0 or 1, which breaks the OK case with a int8. Variant and result types will no longer use bool as GC shape if there is a uint8 or int8 type for another case.

Fixes #284.

@ydnar ydnar self-assigned this Jan 20, 2025
@ydnar ydnar requested a review from lxfontes January 20, 2025 00:26
This is tested in package cm.
@ydnar ydnar merged commit 0521583 into main Jan 27, 2025
15 checks passed
@ydnar ydnar deleted the ydnar/issue284 branch January 27, 2025 16:24
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.

wit/bindgen, cm: wrong value of type result<bool, s8>
1 participant