@@ -57,8 +57,17 @@ class Callable extends StmtParent, Member, @callable {
5757 * constructors).
5858 */
5959 Type getReturnType ( ) {
60- constrs ( this , _, _, result , _, _) or
61- methods ( this , _, _, result , _, _)
60+ constrs ( this , _, _, result , _, _, _) or
61+ methods ( this , _, _, result , _, _, _)
62+ }
63+
64+ /**
65+ * Gets the declared return Kotlin type of this callable (`Nothing` for
66+ * constructors).
67+ */
68+ KotlinType getReturnKotlinType ( ) {
69+ constrs ( this , _, _, _, result , _, _) or
70+ methods ( this , _, _, _, result , _, _)
6271 }
6372
6473 /**
@@ -273,8 +282,8 @@ class Callable extends StmtParent, Member, @callable {
273282 * For example, method `void m(String s, int i)` has the signature `m(java.lang.String,int)`.
274283 */
275284 string getSignature ( ) {
276- constrs ( this , _, result , _, _, _) or
277- methods ( this , _, result , _, _, _)
285+ constrs ( this , _, result , _, _, _, _ ) or
286+ methods ( this , _, result , _, _, _, _ )
278287 }
279288}
280289
@@ -316,7 +325,7 @@ predicate overridesIgnoringAccess(Method m1, RefType t1, Method m2, RefType t2)
316325}
317326
318327private predicate virtualMethodWithSignature ( string sig , RefType t , Method m ) {
319- methods ( m , _, _, _, t , _) and
328+ methods ( m , _, _, _, _ , t , _) and
320329 sig = m .getSignature ( ) and
321330 m .isVirtual ( )
322331}
@@ -365,7 +374,7 @@ class Method extends Callable, @method {
365374 exists ( Method m | this .overrides ( m ) and result = m .getSourceDeclaration ( ) )
366375 }
367376
368- override string getSignature ( ) { methods ( this , _, result , _, _, _) }
377+ override string getSignature ( ) { methods ( this , _, result , _, _, _, _ ) }
369378
370379 /**
371380 * Holds if this method and method `m` are declared in the same type
@@ -382,7 +391,7 @@ class Method extends Callable, @method {
382391 not exists ( int n | this .getParameterType ( n ) != m .getParameterType ( n ) )
383392 }
384393
385- override SrcMethod getSourceDeclaration ( ) { methods ( this , _, _, _, _, result ) }
394+ override SrcMethod getSourceDeclaration ( ) { methods ( this , _, _, _, _, _ , result ) }
386395
387396 /**
388397 * All the methods that could possibly be called when this method
@@ -456,7 +465,7 @@ class Method extends Callable, @method {
456465
457466/** A method that is the same as its source declaration. */
458467class SrcMethod extends Method {
459- SrcMethod ( ) { methods ( _, _, _, _, _, this ) }
468+ SrcMethod ( ) { methods ( _, _, _, _, _, _ , this ) }
460469
461470 /**
462471 * All the methods that could possibly be called when this method
@@ -542,9 +551,9 @@ class Constructor extends Callable, @constructor {
542551 /** Holds if this is a default constructor, not explicitly declared in source code. */
543552 predicate isDefaultConstructor ( ) { isDefConstr ( this ) }
544553
545- override Constructor getSourceDeclaration ( ) { constrs ( this , _, _, _, _, result ) }
554+ override Constructor getSourceDeclaration ( ) { constrs ( this , _, _, _, _, _ , result ) }
546555
547- override string getSignature ( ) { constrs ( this , _, result , _, _, _) }
556+ override string getSignature ( ) { constrs ( this , _, result , _, _, _, _ ) }
548557
549558 override string getAPrimaryQlClass ( ) { result = "Constructor" }
550559}
0 commit comments