Skip to content

[exec.let] Fix let-env argument in let-state env_t and constructor#9143

Merged
tkoeppe merged 1 commit into
cplusplus:mainfrom
abhinavagarwal07:fix-exec-let-env-comma-operator
Jul 16, 2026
Merged

[exec.let] Fix let-env argument in let-state env_t and constructor#9143
tkoeppe merged 1 commit into
cplusplus:mainfrom
abhinavagarwal07:fix-exec-let-env-comma-operator

Conversation

@abhinavagarwal07

@abhinavagarwal07 abhinavagarwal07 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Fix two let-state uses of let-env mis-parenthesized while applying P3826R5 in #8919. The misapplication left get_env(...) outside let-env(...), turning both uses into comma expressions.

In the let-state exposition-only class template, a misplaced closing
parenthesis turned get_env(...) into a comma-operator operand instead of
the second argument to let-env. As a result env_t collapsed to
decltype(get_env(declval<Rcvr&>())), dropping the inner-sender
environment overlay (completion scheduler/domain) carried by let-env,
and the constructor's env initializer was inconsistent with that alias.

Move the closing parenthesis so get_env(rcvr) is passed as let-env's
second argument, matching the two-argument let-env defined earlier in
[exec.let] and the env-t used by the check-types constraint. receiver2's
get_env already composes env over get_env(rcvr), so storing the raw
let-env result is sufficient.
@eisenwave eisenwave added the P1-Important Misapplication of paper, malformed code, internal inconsistencies label Jun 18, 2026
@tkoeppe

tkoeppe commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Presumably the missing parentheses just make the whole thing ill-formed...

@tkoeppe tkoeppe merged commit 6c31256 into cplusplus:main Jul 16, 2026
3 of 4 checks passed
tkoeppe pushed a commit that referenced this pull request Jul 16, 2026
@tkoeppe

tkoeppe commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

I appreciate the dedication to the research, but just as some feedback: I don't think anyone would seriously have misunderstood this in the way your analysis considers. It was clearly just a simple oversight, and no analysis beyond "misapplication of the paper" is required here.

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

Labels

P1-Important Misapplication of paper, malformed code, internal inconsistencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants