mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Fixed a bug that results in incorrect type evaluation when assigning a function with a NoReturn
return type to a Callable[..., T]
.
This commit is contained in:
parent
5c480848ce
commit
00d8f81a1c
@ -25514,11 +25514,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
|
||||
effectiveFlags |= AssignTypeFlags.RetainLiteralsForTypeVar;
|
||||
}
|
||||
|
||||
if (isNever(srcReturnType)) {
|
||||
// We'll allow any function that returns NoReturn to match any
|
||||
// function return type, consistent with other type checkers.
|
||||
isReturnTypeCompatible = true;
|
||||
} else if (
|
||||
if (
|
||||
assignType(
|
||||
destReturnType,
|
||||
srcReturnType,
|
||||
|
Loading…
Reference in New Issue
Block a user