@@ -3031,6 +3031,17 @@ module Impl<FullStateConfigSig Config> {
3031
3031
this instanceof PathNodeSinkGroup
3032
3032
}
3033
3033
3034
+ private string ppType ( ) {
3035
+ this instanceof PathNodeSink and result = ""
3036
+ or
3037
+ this .( PathNodeMid ) .getAp ( ) instanceof AccessPathNil and result = ""
3038
+ or
3039
+ exists ( DataFlowType t | t = this .( PathNodeMid ) .getAp ( ) .getHead ( ) .getContainerType ( ) |
3040
+ // The `concat` becomes "" if `ppReprType` has no result.
3041
+ result = concat ( " : " + ppReprType ( t ) )
3042
+ )
3043
+ }
3044
+
3034
3045
private string ppAp ( ) {
3035
3046
this instanceof PathNodeSink and result = ""
3036
3047
or
@@ -3046,14 +3057,14 @@ module Impl<FullStateConfigSig Config> {
3046
3057
}
3047
3058
3048
3059
/** Gets a textual representation of this element. */
3049
- string toString ( ) { result = this .getNodeEx ( ) .toString ( ) + this .ppAp ( ) }
3060
+ string toString ( ) { result = this .getNodeEx ( ) .toString ( ) + this .ppType ( ) + this . ppAp ( ) }
3050
3061
3051
3062
/**
3052
3063
* Gets a textual representation of this element, including a textual
3053
3064
* representation of the call context.
3054
3065
*/
3055
3066
string toStringWithContext ( ) {
3056
- result = this .getNodeEx ( ) .toString ( ) + this .ppAp ( ) + this .ppCtx ( )
3067
+ result = this .getNodeEx ( ) .toString ( ) + this .ppType ( ) + this . ppAp ( ) + this .ppCtx ( )
3057
3068
}
3058
3069
3059
3070
/**
@@ -3998,14 +4009,14 @@ module Impl<FullStateConfigSig Config> {
3998
4009
*/
3999
4010
class PartialPathNode extends TPartialPathNode {
4000
4011
/** Gets a textual representation of this element. */
4001
- string toString ( ) { result = this .getNodeEx ( ) .toString ( ) + this .ppAp ( ) }
4012
+ string toString ( ) { result = this .getNodeEx ( ) .toString ( ) + this .ppType ( ) + this . ppAp ( ) }
4002
4013
4003
4014
/**
4004
4015
* Gets a textual representation of this element, including a textual
4005
4016
* representation of the call context.
4006
4017
*/
4007
4018
string toStringWithContext ( ) {
4008
- result = this .getNodeEx ( ) .toString ( ) + this .ppAp ( ) + this .ppCtx ( )
4019
+ result = this .getNodeEx ( ) .toString ( ) + this .ppType ( ) + this . ppAp ( ) + this .ppCtx ( )
4009
4020
}
4010
4021
4011
4022
/**
@@ -4046,6 +4057,19 @@ module Impl<FullStateConfigSig Config> {
4046
4057
*/
4047
4058
int getSinkDistance ( ) { result = distSink ( this .getNodeEx ( ) .getEnclosingCallable ( ) ) }
4048
4059
4060
+ private string ppType ( ) {
4061
+ this instanceof PartialPathNodeRev and result = ""
4062
+ or
4063
+ this .( PartialPathNodeFwd ) .getAp ( ) instanceof PartialAccessPathNil and result = ""
4064
+ or
4065
+ exists ( DataFlowType t |
4066
+ t = this .( PartialPathNodeFwd ) .getAp ( ) .( PartialAccessPathCons ) .getType ( )
4067
+ |
4068
+ // The `concat` becomes "" if `ppReprType` has no result.
4069
+ result = concat ( " : " + ppReprType ( t ) )
4070
+ )
4071
+ }
4072
+
4049
4073
private string ppAp ( ) {
4050
4074
exists ( string s |
4051
4075
s = this .( PartialPathNodeFwd ) .getAp ( ) .toString ( ) or
0 commit comments