@@ -13,22 +13,32 @@ abstract class TypeMention extends AstNode {
1313 /** Gets the type that this node resolves to, if any. */
1414 abstract Type resolveType ( ) ;
1515
16- /** Gets the sub mention at `path`. */
17- pragma [ nomagic]
18- private TypeMention getMentionAt ( TypePath path ) {
16+ // /** Gets the sub mention at `path`. */
17+ // pragma[nomagic]
18+ // private TypeMention getMentionAt(TypePath path) {
19+ // path.isEmpty() and
20+ // result = this
21+ // or
22+ // exists(int i, TypeParameter tp, TypeMention arg, TypePath suffix |
23+ // arg = this.getTypeArgument(pragma[only_bind_into](i)) and
24+ // result = arg.getMentionAt(suffix) and
25+ // path = TypePath::cons(tp, suffix) and
26+ // tp = this.resolveType().getTypeParameter(pragma[only_bind_into](i))
27+ // )
28+ // }
29+ /** Gets the type that the sub mention at `path` resolves to, if any. */
30+ Type resolveTypeAt ( TypePath path ) {
1931 path .isEmpty ( ) and
20- result = this
32+ result = this . resolveType ( )
2133 or
2234 exists ( int i , TypeParameter tp , TypeMention arg , TypePath suffix |
2335 arg = this .getTypeArgument ( pragma [ only_bind_into ] ( i ) ) and
24- result = arg .getMentionAt ( suffix ) and
36+ result = arg .resolveTypeAt ( suffix ) and
2537 path = TypePath:: cons ( tp , suffix ) and
2638 tp = this .resolveType ( ) .getTypeParameter ( pragma [ only_bind_into ] ( i ) )
2739 )
2840 }
29-
30- /** Gets the type that the sub mention at `path` resolves to, if any. */
31- Type resolveTypeAt ( TypePath path ) { result = this .getMentionAt ( path ) .resolveType ( ) }
41+ // result = this.getMentionAt(path).resolveType() }
3242}
3343
3444class ArrayTypeReprMention extends TypeMention instanceof ArrayTypeRepr {
0 commit comments