Skip to content

Conversation

@swernli
Copy link
Collaborator

@swernli swernli commented Sep 3, 2023

Fixes #510

Copy link
Contributor

@sezna sezna left a comment

Choose a reason for hiding this comment

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

Makes sense to me, and thanks for fixing this one.

@swernli swernli merged commit 76e91f1 into main Sep 6, 2023
@swernli swernli deleted the swernli/issue510 branch September 6, 2023 01:09
swernli added a commit that referenced this pull request Feb 20, 2025
This fixes a quirk leftover from the fixes in #649 and #793. Those introduced and then updated a conditional that avoided unifying certain types during type checking, but it turns out it was always safe to unconditionally unify the types once #649 introduced the explicit return type tracking. With this fix, the lifted lambda callables with explicit returns have the correct output type instead of always being `Unit` and RCA is able to use that type information as expected, avoiding the panic.

Fixes #2186
github-merge-queue bot pushed a commit that referenced this pull request Feb 20, 2025
This fixes a quirk leftover from the fixes in #649 and #793. Those
introduced and then updated a conditional that avoided unifying certain
types during type checking, but it turns out it was always safe to
unconditionally unify the types once #649 introduced the explicit return
type tracking. With this fix, the lifted lambda callables with explicit
returns have the correct output type instead of always being `Unit` and
RCA is able to use that type information as expected, avoiding the
panic.

Fixes #2186
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.

Return statements in lambdas are checked against the surrounding scope's expected return type

3 participants