@@ -509,12 +509,7 @@ private module StructExprMatchingInput implements MatchingInputSig {
509509 // The struct/enum type is supplied explicitly as a type qualifier, e.g.
510510 // `Foo<Bar>::Variant { ... }`.
511511 apos .isStructPos ( ) and
512- exists ( Path p , TypeMention tm |
513- p = this .getPath ( ) and
514- if resolvePath ( p ) instanceof Variant then tm = p .getQualifier ( ) else tm = p
515- |
516- result = tm .resolveTypeAt ( path )
517- )
512+ result = this .getPath ( ) .( TypeMention ) .resolveTypeAt ( path )
518513 }
519514
520515 Declaration getTarget ( ) { result = resolvePath ( this .getPath ( ) ) }
@@ -1242,12 +1237,7 @@ private module StructPatMatchingInput implements MatchingInputSig {
12421237 // The struct/enum type is supplied explicitly as a type qualifier, e.g.
12431238 // `let Foo<Bar>::Variant { ... } = ...`.
12441239 apos .isStructPos ( ) and
1245- exists ( Path p , TypeMention tm |
1246- p = this .getPath ( ) and
1247- if resolvePath ( p ) instanceof Variant then tm = p .getQualifier ( ) else tm = p
1248- |
1249- result = tm .resolveTypeAt ( path )
1250- )
1240+ result = this .getPath ( ) .( TypeMention ) .resolveTypeAt ( path )
12511241 }
12521242
12531243 Declaration getTarget ( ) { result = resolvePath ( this .getPath ( ) ) }
@@ -1297,14 +1287,9 @@ private module TupleStructPatMatchingInput implements MatchingInputSig {
12971287 result = inferType ( this .getNodeAt ( apos ) , path )
12981288 or
12991289 // The struct/enum type is supplied explicitly as a type qualifier, e.g.
1300- // `let Option::<Foo>(x) = ...`.
1290+ // `let Option::<Foo>::Some (x) = ...`.
13011291 apos .isSelf ( ) and
1302- exists ( Path p , TypeMention tm |
1303- p = this .getPath ( ) and
1304- if resolvePath ( p ) instanceof Variant then tm = p .getQualifier ( ) else tm = p
1305- |
1306- result = tm .resolveTypeAt ( path )
1307- )
1292+ result = this .getPath ( ) .( TypeMention ) .resolveTypeAt ( path )
13081293 }
13091294
13101295 Declaration getTarget ( ) { result = resolvePath ( this .getPath ( ) ) }
0 commit comments