@@ -822,7 +822,9 @@ class ModuleNode instanceof Module {
822822 *
823823 * Does not take inheritance into account.
824824 */
825- MethodNode getAnOwnSingletonMethod ( ) { result .asMethod ( ) = super .getAnOwnSingletonMethod ( ) }
825+ MethodNode getAnOwnSingletonMethod ( ) {
826+ result .asCallableAstNode ( ) = super .getAnOwnSingletonMethod ( )
827+ }
826828
827829 /**
828830 * Gets the singleton method named `name` declared in this module (or in a singleton class
@@ -841,7 +843,7 @@ class ModuleNode instanceof Module {
841843 * Does not take inheritance into account.
842844 */
843845 MethodNode getAnOwnInstanceMethod ( ) {
844- result .asMethod ( ) = this .getADeclaration ( ) .getAMethod ( ) .( Method )
846+ result .asCallableAstNode ( ) = this .getADeclaration ( ) .getAMethod ( ) .( Method )
845847 }
846848
847849 /**
@@ -860,7 +862,7 @@ class ModuleNode instanceof Module {
860862 * Does not take inheritance into account.
861863 */
862864 ParameterNode getAnOwnInstanceSelf ( ) {
863- result = TSelfParameterNode ( this .getAnOwnInstanceMethod ( ) .asMethod ( ) )
865+ result = TSelfParameterNode ( this .getAnOwnInstanceMethod ( ) .asCallableAstNode ( ) )
864866 }
865867
866868 /**
@@ -1015,10 +1017,10 @@ class MethodNode extends CallableNode {
10151017 MethodNode ( ) { super .asCallableAstNode ( ) instanceof MethodBase }
10161018
10171019 /** Gets the underlying AST node for this method. */
1018- MethodBase asMethod ( ) { result = this .asCallableAstNode ( ) }
1020+ override MethodBase asCallableAstNode ( ) { result = super .asCallableAstNode ( ) }
10191021
10201022 /** Gets the name of this method. */
1021- string getMethodName ( ) { result = this .asMethod ( ) .getName ( ) }
1023+ string getMethodName ( ) { result = this .asCallableAstNode ( ) .getName ( ) }
10221024}
10231025
10241026/**
@@ -1028,7 +1030,7 @@ class BlockNode extends CallableNode {
10281030 BlockNode ( ) { super .asCallableAstNode ( ) instanceof Block }
10291031
10301032 /** Gets the underlying AST node for this block. */
1031- Block asBlock ( ) { result = this .asCallableAstNode ( ) }
1033+ override Block asCallableAstNode ( ) { result = super .asCallableAstNode ( ) }
10321034}
10331035
10341036/**
0 commit comments