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

Fix WASM casting bug #73

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fix WASM casting bug #73

wants to merge 3 commits into from

Conversation

thomasostfeld
Copy link

Description

This PR adds a workaround for a bug present in the current dart2wasm compiler.
Switch statements that only contain cases matching the same type wrongfully try to cast the value to that type.
This breaks our checks against certain strings when parsing tex to math.

Related issues & PRs

Resolves dart-lang/sdk#59782

Checklist

Remove If [...] items that do not apply to your PR.

  • I have made myself familiar with the CaTeX
    contributing guide.
  • I added a PR description.
  • I linked all related issues and PRs I could find (no links if there are none).
  • If this PR changes anything about the main math_keyboard or example package
    (also README etc.), I created an entry in CHANGELOG.md (## UPCOMING RELEASE if the change
    on its own is not worth an update).
  • If this PR includes a notable change in the math_keyboard package, I updated the version
    according to Dart's semantic versioning.
  • All required checks pass.

@thomasostfeld thomasostfeld added the bug Something isn't working label Dec 22, 2024
@thomasostfeld thomasostfeld requested a review from edhom as a code owner December 22, 2024 10:42
@CLAassistant
Copy link

CLAassistant commented Dec 22, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi 👋🏽 Thank you for opening your first PR with simpleclub/math_keyboard ❤

You can expect a review from us soon ☺️
In the meantime, please check our contribution guidelines, the PR checklist, and the PR checks.

@thomasostfeld thomasostfeld changed the title Fix wasm cast Fix WASM casting bug Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

Illegal cast in switch statement for dynamic values on WASM
3 participants