Skip to content

Commit

Permalink
Handled case where base type of call expression evaluates to a TypeVa…
Browse files Browse the repository at this point in the history
…r type.
  • Loading branch information
msfterictraut committed Sep 22, 2019
1 parent 232c13c commit a109484
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/src/analyzer/expressionEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit a109484

Please sign in to comment.