Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 4f81ba2

Browse files
authored
port null check for specific type creation (#1180)
1 parent 8c41e23 commit 4f81ba2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Analysis/Ast/Impl/Types/PythonFunctionOverload.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,10 @@ private IMember GetSpecificReturnType(IPythonClassType selfClassType, IArgumentS
157157

158158
case IGenericType gt when args != null: // -> CLASS[T] on standalone function (i.e. -> List[T]).
159159
var typeArgs = ExpressionEval.GetTypeArgumentsFromParameters(this, args);
160-
Debug.Assert(typeArgs != null);
161-
return gt.CreateSpecificType(typeArgs);
160+
if (typeArgs != null) {
161+
return gt.CreateSpecificType(typeArgs);
162+
}
163+
break;
162164
}
163165

164166
return StaticReturnValue;

0 commit comments

Comments
 (0)