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

Make WireBase::verifyAlreadyComposed smarter in identifying composed wires that can ignore input #669

Open
Yttruire opened this issue May 9, 2023 · 0 comments

Comments

@Yttruire
Copy link
Contributor

Yttruire commented May 9, 2023

TODO

Make WireBase::verifyAlreadyComposed smarter: If the wire is not using any inputs, don't fail (Already has some check in !wire->ignoreInputTypeCheck, but it is currently still failing)

The function can be found in src -> core -> shards -> wires.cpp::49 as of commit eda72da

Rationale

image

(Replace `Dispatch` with `Step`)

As it stands, the following sample code retrieved from a version of the full sample code to the Yes-No Shards game tutorial will cause the end-round looped wire to be composed with a Bool input type, and then there will be a subsequent call to end-round with a different input type, causing the error Error: Attempted to call an already composed wire with a different input type! wire: end-round, old type: Bool, new type: None.

This is undesirable when the aforementioned wire does not manipulate the input at all. The compiler should recognize that the mismatch in input types does not matter for such wires

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant