@@ -60,14 +60,18 @@ private module Impl {
6060 private Element getImmediateChildOfIterableDeclContext (
6161 IterableDeclContext e , int index , string partialPredicateCall
6262 ) {
63- exists ( int b , int bElement , int n |
63+ exists ( int b , int bElement , int n , int nMember |
6464 b = 0 and
6565 bElement = b + 1 + max ( int i | i = - 1 or exists ( getImmediateChildOfElement ( e , i , _) ) | i ) and
6666 n = bElement and
67+ nMember = n + 1 + max ( int i | i = - 1 or exists ( e .getImmediateMember ( i ) ) | i ) and
6768 (
6869 none ( )
6970 or
7071 result = getImmediateChildOfElement ( e , index - b , partialPredicateCall )
72+ or
73+ result = e .getImmediateMember ( index - n ) and
74+ partialPredicateCall = "Member(" + ( index - n ) .toString ( ) + ")"
7175 )
7276 )
7377 }
@@ -1562,18 +1566,14 @@ private module Impl {
15621566 private Element getImmediateChildOfEnumCaseDecl (
15631567 EnumCaseDecl e , int index , string partialPredicateCall
15641568 ) {
1565- exists ( int b , int bDecl , int n , int nElement |
1569+ exists ( int b , int bDecl , int n |
15661570 b = 0 and
15671571 bDecl = b + 1 + max ( int i | i = - 1 or exists ( getImmediateChildOfDecl ( e , i , _) ) | i ) and
15681572 n = bDecl and
1569- nElement = n + 1 + max ( int i | i = - 1 or exists ( e .getImmediateElement ( i ) ) | i ) and
15701573 (
15711574 none ( )
15721575 or
15731576 result = getImmediateChildOfDecl ( e , index - b , partialPredicateCall )
1574- or
1575- result = e .getImmediateElement ( index - n ) and
1576- partialPredicateCall = "Element(" + ( index - n ) .toString ( ) + ")"
15771577 )
15781578 )
15791579 }
@@ -3970,17 +3970,14 @@ private module Impl {
39703970 private Element getImmediateChildOfSelfApplyExpr (
39713971 SelfApplyExpr e , int index , string partialPredicateCall
39723972 ) {
3973- exists ( int b , int bApplyExpr , int n , int nBase |
3973+ exists ( int b , int bApplyExpr , int n |
39743974 b = 0 and
39753975 bApplyExpr = b + 1 + max ( int i | i = - 1 or exists ( getImmediateChildOfApplyExpr ( e , i , _) ) | i ) and
39763976 n = bApplyExpr and
3977- nBase = n + 1 and
39783977 (
39793978 none ( )
39803979 or
39813980 result = getImmediateChildOfApplyExpr ( e , index - b , partialPredicateCall )
3982- or
3983- index = n and result = e .getImmediateBase ( ) and partialPredicateCall = "Base()"
39843981 )
39853982 )
39863983 }
0 commit comments