Skip to content

Conversation

@Morriar
Copy link
Contributor

@Morriar Morriar commented Jun 9, 2025

We do not translate assertions in ternary expressions to avoid altering the semantic of the code.

For example:

a = T.must(b) ? T.must(c) : T.must(d)

would become

a = T.must(b) ? T.must(c) : d #: !nil

which does not match the original intent as it would be type checked as this:

a = T.must(T.must(b) ? T.must(c) : d)

Morriar added 2 commits June 9, 2025 15:49
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar self-assigned this Jun 9, 2025
@Morriar Morriar requested a review from a team as a code owner June 9, 2025 19:52
@Morriar Morriar added the bugfix Fix a bug label Jun 9, 2025
@Morriar Morriar merged commit 234a4b0 into main Jun 9, 2025
8 checks passed
@Morriar Morriar deleted the at-fix-ternary branch June 9, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants