@@ -376,19 +376,12 @@ extension ValueDefUseWalker {
376376 // accordingly.
377377 switch ( urc. type. isOptional, urc. fromInstance. type. isOptional) {
378378 case ( true , false ) :
379- if walkDownUses ( ofValue: urc, path: path. push ( . enumCase, index: 0 ) ) == . abortWalk {
380- return . abortWalk
381- }
382379 return walkDownUses ( ofValue: urc, path: path. push ( . enumCase, index: 1 ) )
383380 case ( false , true ) :
384- if let path = path. popIfMatches ( . enumCase, index: 0 ) {
385- if walkDownUses ( ofValue: urc, path: path) == . abortWalk {
386- return . abortWalk
387- } else if let path = path. popIfMatches ( . enumCase, index: 1 ) {
388- return walkDownUses ( ofValue: urc, path: path)
389- }
381+ if let path = path. popIfMatches ( . enumCase, index: 1 ) {
382+ return walkDownUses ( ofValue: urc, path: path)
390383 }
391- return . abortWalk
384+ return unmatchedPath ( value : operand , path : path )
392385 default :
393386 return walkDownUses ( ofValue: urc, path: path)
394387 }
@@ -726,20 +719,12 @@ extension ValueUseDefWalker {
726719 // accordingly.
727720 switch ( urc. type. isOptional, urc. fromInstance. type. isOptional) {
728721 case ( true , false ) :
729- if let path = path. popIfMatches ( . enumCase, index: 0 ) {
730- if walkUp ( value: urc. fromInstance, path: path) == . abortWalk {
731- return . abortWalk
732- } else if let path = path. popIfMatches ( . enumCase, index: 1 ) {
733- return walkUp ( value: urc. fromInstance, path: path)
734- }
722+ if let path = path. popIfMatches ( . enumCase, index: 1 ) {
723+ return walkUp ( value: urc. fromInstance, path: path)
735724 }
736- return . abortWalk
725+ return unmatchedPath ( value : urc . fromInstance , path : path )
737726 case ( false , true ) :
738- if walkUp ( value: urc. fromInstance, path: path. push ( . enumCase, index: 0 ) ) == . abortWalk {
739- return . abortWalk
740- } else {
741- return walkUp ( value: urc. fromInstance, path: path. push ( . enumCase, index: 1 ) )
742- }
727+ return walkUp ( value: urc. fromInstance, path: path. push ( . enumCase, index: 1 ) )
743728 default :
744729 return walkUp ( value: urc. fromInstance, path: path)
745730 }
0 commit comments