mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-19 04:07:36 +03:00
Fixed bug that led to a confusing hover type for the return result of an async generator function. This addresses #5411. (#5468)
Co-authored-by: Eric Traut <erictr@microsoft.com>
This commit is contained in:
parent
72491ca691
commit
f9796dd5cd
@ -16919,6 +16919,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
|
||||
|
||||
// Note that the inferred type, once lazily computed, needs to wrap the
|
||||
// resulting type in an awaitable.
|
||||
functionType.details.flags |= FunctionTypeFlags.WrapReturnTypeInAwait;
|
||||
awaitableFunctionType.details.flags |= FunctionTypeFlags.WrapReturnTypeInAwait;
|
||||
|
||||
return awaitableFunctionType;
|
||||
|
Loading…
Reference in New Issue
Block a user