Handled case where base type of call expression evaluates to a TypeVar type.

This commit is contained in:
Eric Traut 2019-09-21 20:29:13 -07:00
parent 232c13c093
commit a109484776

View File

@ -1615,7 +1615,11 @@ export class ExpressionEvaluator {
specializeReturnType = true): TypeResult {
let type: Type | undefined;
const callType = baseTypeResult.type;
let callType = baseTypeResult.type;
if (callType.category === TypeCategory.TypeVar) {
callType = TypeUtils.specializeType(callType, undefined);
}
if (callType.category === TypeCategory.Class) {
if (ClassType.isBuiltIn(callType)) {