File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
packages/pyright-internal/src/analyzer Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -935,8 +935,6 @@ export function getCodeFlowEngine(
935935 }
936936
937937 function getTypeFromBranchFlowNode ( branchNode : FlowLabel ) : FlowNodeTypeResult {
938- const typesToCombine : Type [ ] = [ ] ;
939-
940938 let sawIncomplete = false ;
941939
942940 for ( const antecedent of branchNode . antecedents ) {
@@ -952,15 +950,8 @@ export function getCodeFlowEngine(
952950 if ( flowTypeResult . isIncomplete ) {
953951 sawIncomplete = true ;
954952 }
955-
956- if ( flowTypeResult . type ) {
957- typesToCombine . push ( flowTypeResult . type ) ;
958- }
959953 }
960-
961- const effectiveType = typesToCombine . length > 0 ? combineTypes ( typesToCombine ) : undefined ;
962-
963- return setCacheEntry ( branchNode , effectiveType , sawIncomplete ) ;
954+ return setCacheEntry ( branchNode , NeverType . createNever ( ) , sawIncomplete ) ;
964955 }
965956
966957 function getTypeFromLoopFlowNode (
You can’t perform that action at this time.
0 commit comments