mirror of
https://github.com/microsoft/pyright.git
synced 2024-10-03 19:37:39 +03:00
Added support for call-site return type inference for class and instance methods. This addresses https://github.com/microsoft/pylance-release/issues/5515. (#7335)
This commit is contained in:
parent
3232c25589
commit
f7e37d51b9
@ -21435,7 +21435,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
|
||||
inferTypeIfNeeded = true
|
||||
) {
|
||||
const specializedReturnType = FunctionType.getSpecializedReturnType(type, /* includeInferred */ false);
|
||||
if (specializedReturnType) {
|
||||
if (specializedReturnType && !isUnknown(specializedReturnType)) {
|
||||
return adjustCallableReturnType(specializedReturnType, /* trackedSignatures */ undefined);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user