@@ -28,26 +28,15 @@ module Impl {
28
28
/** Gets the position of this type parameter. */
29
29
int getPosition ( ) { this = any ( GenericParamList l ) .getTypeParam ( result ) }
30
30
31
- private TypeBound getTypeBoundAt ( int i , int j ) {
32
- exists ( TypeBoundList tbl | result = tbl .getBound ( j ) |
33
- tbl = this .getTypeBoundList ( ) and i = 0
34
- or
35
- exists ( WherePred wp |
36
- wp = this .( TypeParamItemNode ) .getAWherePred ( ) and
37
- tbl = wp .getTypeBoundList ( ) and
38
- wp = any ( WhereClause wc ) .getPredicate ( i )
39
- )
40
- )
41
- }
42
-
43
31
/**
44
32
* Gets the `index`th type bound of this type parameter, if any.
45
33
*
46
34
* This includes type bounds directly on this type parameter and bounds from
47
35
* any `where` clauses for this type parameter.
48
36
*/
49
37
TypeBound getTypeBound ( int index ) {
50
- result = rank [ index + 1 ] ( int i , int j | | this .getTypeBoundAt ( i , j ) order by i , j )
38
+ result =
39
+ rank [ index + 1 ] ( int i , int j | | this .( TypeParamItemNode ) .getTypeBoundAt ( i , j ) order by i , j )
51
40
}
52
41
53
42
/**
@@ -56,12 +45,7 @@ module Impl {
56
45
* This includes type bounds directly on this type parameter and bounds from
57
46
* any `where` clauses for this type parameter.
58
47
*/
59
- TypeBound getATypeBound ( ) {
60
- // NOTE: This predicate is used in path resolution, so it can not be
61
- // defined using `getTypeBound` as that would cause non-monotonic
62
- // recursion due to the `rank`.
63
- result = this .getTypeBoundAt ( _, _)
64
- }
48
+ TypeBound getATypeBound ( ) { result = this .getTypeBound ( _) }
65
49
66
50
override string toAbbreviatedString ( ) { result = this .getName ( ) .getText ( ) }
67
51
0 commit comments