Skip to content

add parens around auto_await for filters and calls#1614

Merged
davidism merged 1 commit intomainfrom
async-env-filter
Mar 7, 2022
Merged

add parens around auto_await for filters and calls#1614
davidism merged 1 commit intomainfrom
async-env-filter

Conversation

@davidism
Copy link
Copy Markdown
Member

@davidism davidism commented Mar 7, 2022

The compiler doesn't add parentheses around the await auto_await(...) expression when visiting filters and tests. If a subscription is used after the call, the compiler will produce code that tries to subscript the coroutine instead of the awaited result. This adds surrounding parentheses, which matches other similar situations.

fixes #1573

@davidism davidism added this to the 3.1.0 milestone Mar 7, 2022
@davidism davidism merged commit 20eb7f5 into main Mar 7, 2022
@davidism davidism deleted the async-env-filter branch March 7, 2022 17:36
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

custom filters with async_true enabled giving 'coroutine' object is not subscriptable error

1 participant