@@ -5,8 +5,10 @@ private import TypeInferencePlugin as Plugin
55private import codeql.unified.internal.StaticNameBinding
66private import codeql.unified.internal.ExprPositions
77
8+ final class TypeMention = TypeMentionImpl ;
9+
810/** An AST node that mentions a type. */
9- abstract class TypeMention extends AstNode {
11+ abstract private class TypeMentionImpl extends AstNode {
1012 /**
1113 * Gets the type mentioned at `path`.
1214 */
@@ -27,8 +29,10 @@ private Type resolveType(Identifier access) {
2729 )
2830}
2931
30- abstract private class ExprTypeMention extends TypeMention , Expr {
31- ExprTypeMention ( ) { isInTypeContext ( this ) }
32+ final class ExprTypeMention = ExprTypeMentionImpl ;
33+
34+ abstract private class ExprTypeMentionImpl extends TypeMentionImpl , Expr {
35+ ExprTypeMentionImpl ( ) { isInTypeContext ( this ) }
3236
3337 pragma [ nomagic]
3438 abstract TypePath getTypeArgumentPath ( int i ) ;
@@ -37,7 +41,7 @@ abstract private class ExprTypeMention extends TypeMention, Expr {
3741/**
3842 * A type mention that resolves via an alias (aliases are expanded).
3943 */
40- private class AliasExprTypeMention extends ExprTypeMention {
44+ private class AliasExprTypeMention extends ExprTypeMentionImpl {
4145 private TypeAliasDeclaration alias ;
4246
4347 AliasExprTypeMention ( ) { alias .getNameNode ( ) = getStaticBindingTargetFromRef ( this ) }
@@ -62,7 +66,7 @@ private class AliasExprTypeMention extends ExprTypeMention {
6266/**
6367 * A type mention that does not resolve via an alias.
6468 */
65- private class NonAliasExprTypeMention extends ExprTypeMention {
69+ private class NonAliasExprTypeMention extends ExprTypeMentionImpl {
6670 NonAliasExprTypeMention ( ) { not this instanceof AliasExprTypeMention }
6771
6872 private Type getRootType0 ( ) {
@@ -141,7 +145,7 @@ private class NonAliasExprTypeMention extends ExprTypeMention {
141145 }
142146}
143147
144- private class GenericTypeExprTypeMention extends TypeMention , GenericTypeExpr {
148+ private class GenericTypeExprTypeMention extends TypeMentionImpl , GenericTypeExpr {
145149 private ExprTypeMention base ;
146150
147151 GenericTypeExprTypeMention ( ) { base = this .getBase ( ) }
@@ -163,7 +167,7 @@ private class GenericTypeExprTypeMention extends TypeMention, GenericTypeExpr {
163167}
164168
165169/** A class declaration mentions itself. */
166- private class ClassLikeDeclarationTypeMention extends TypeMention , Identifier {
170+ private class ClassLikeDeclarationTypeMention extends TypeMentionImpl , Identifier {
167171 private ClassLikeDeclaration c ;
168172
169173 ClassLikeDeclarationTypeMention ( ) { this = c .getNameNode ( ) }
0 commit comments