@@ -240,7 +240,7 @@ private predicate typeEqualityLeft(AstNode n1, TypePath path1, AstNode n2, TypeP
240240 any ( PrefixExpr pe |
241241 pe .getOperatorName ( ) = "*" and
242242 pe .getExpr ( ) = n1 and
243- path1 = TypePath :: consInverse ( TRefTypeParameter ( ) , path2 )
243+ path1 . isCons ( TRefTypeParameter ( ) , path2 )
244244 )
245245}
246246
@@ -926,7 +926,7 @@ private Type inferRefExprType(Expr e, TypePath path) {
926926 e = re .getExpr ( ) and
927927 exists ( TypePath exprPath , TypePath refPath , Type exprType |
928928 result = inferType ( re , exprPath ) and
929- exprPath = TypePath :: consInverse ( TRefTypeParameter ( ) , refPath ) and
929+ exprPath . isCons ( TRefTypeParameter ( ) , refPath ) and
930930 exprType = inferType ( e )
931931 |
932932 if exprType = TRefType ( )
@@ -940,8 +940,9 @@ private Type inferRefExprType(Expr e, TypePath path) {
940940
941941pragma [ nomagic]
942942private Type inferTryExprType ( TryExpr te , TypePath path ) {
943- exists ( TypeParam tp |
944- result = inferType ( te .getExpr ( ) , TypePath:: consInverse ( TTypeParamTypeParameter ( tp ) , path ) )
943+ exists ( TypeParam tp , TypePath path0 |
944+ result = inferType ( te .getExpr ( ) , path0 ) and
945+ path0 .isCons ( TTypeParamTypeParameter ( tp ) , path )
945946 |
946947 tp = any ( ResultEnum r ) .getGenericParamList ( ) .getGenericParam ( 0 )
947948 or
@@ -1017,7 +1018,7 @@ private module Cached {
10171018 pragma [ nomagic]
10181019 Type getTypeAt ( TypePath path ) {
10191020 exists ( TypePath path0 | result = inferType ( this , path0 ) |
1020- path0 = TypePath :: consInverse ( TRefTypeParameter ( ) , path )
1021+ path0 . isCons ( TRefTypeParameter ( ) , path )
10211022 or
10221023 not path0 .isCons ( TRefTypeParameter ( ) , _) and
10231024 not ( path0 .isEmpty ( ) and result = TRefType ( ) ) and
0 commit comments