Fixed potential crashing bug.

This commit is contained in:
Eric Traut 2021-12-22 01:44:06 -07:00
parent 84f82f87ad
commit e11b97c03b
2 changed files with 2 additions and 2 deletions

View File

@ -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(

View File

@ -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,