Skip to content

Conversation

@Morriar
Copy link
Contributor

@Morriar Morriar commented Jun 9, 2025

We shouldn't blindly translate assertions when they are at the end of the line.

Consider this example:

a - T.must(b)

before this change it would get translated to this:

a - b #: as !nil

which would actually get type checked as this:

T.must(a - b)

Morriar added 2 commits June 9, 2025 16:17
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 20:20
@Morriar Morriar added the bugfix Fix a bug label Jun 9, 2025
Morriar added 2 commits June 9, 2025 16:33
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Base automatically changed from at-fix-ternary to main June 9, 2025 21:12
Translate `T.bind(self, X)` calls to RBS comments
@Morriar Morriar enabled auto-merge June 10, 2025 18:28
@Morriar Morriar merged commit 30390c1 into main Jun 10, 2025
8 checks passed
@Morriar Morriar deleted the at-fix-translate-end-of-line branch June 10, 2025 18:36
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.

3 participants