@@ -376,19 +376,12 @@ extension ValueDefUseWalker {
376
376
// accordingly.
377
377
switch ( urc. type. isOptional, urc. fromInstance. type. isOptional) {
378
378
case ( true , false ) :
379
- if walkDownUses ( ofValue: urc, path: path. push ( . enumCase, index: 0 ) ) == . abortWalk {
380
- return . abortWalk
381
- }
382
379
return walkDownUses ( ofValue: urc, path: path. push ( . enumCase, index: 1 ) )
383
380
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)
390
383
}
391
- return . abortWalk
384
+ return unmatchedPath ( value : operand , path : path )
392
385
default :
393
386
return walkDownUses ( ofValue: urc, path: path)
394
387
}
@@ -726,20 +719,12 @@ extension ValueUseDefWalker {
726
719
// accordingly.
727
720
switch ( urc. type. isOptional, urc. fromInstance. type. isOptional) {
728
721
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)
735
724
}
736
- return . abortWalk
725
+ return unmatchedPath ( value : urc . fromInstance , path : path )
737
726
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 ) )
743
728
default :
744
729
return walkUp ( value: urc. fromInstance, path: path)
745
730
}
0 commit comments