mirror of
https://github.com/microsoft/pyright.git
synced 2024-10-06 21:07:19 +03:00
Fixed potential crashing bug.
This commit is contained in:
parent
84f82f87ad
commit
e11b97c03b
@ -21921,7 +21921,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
|
||||
);
|
||||
}
|
||||
} else if (isOverloadedFunction(memberType)) {
|
||||
const newOverloadType = OverloadedFunctionType.create();
|
||||
const newOverloadType = OverloadedFunctionType.create([]);
|
||||
memberType.overloads.forEach((overload) => {
|
||||
if (FunctionType.isOverloaded(overload)) {
|
||||
const boundMethod = bindFunctionToClassOrObject(
|
||||
|
@ -1427,7 +1427,7 @@ export interface OverloadedFunctionType extends TypeBase {
|
||||
}
|
||||
|
||||
export namespace OverloadedFunctionType {
|
||||
export function create(overloads: FunctionType[] = []) {
|
||||
export function create(overloads: FunctionType[]) {
|
||||
const newType: OverloadedFunctionType = {
|
||||
category: TypeCategory.OverloadedFunction,
|
||||
overloads,
|
||||
|
Loading…
Reference in New Issue
Block a user