File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
csharp/ql/lib/semmle/code/csharp/exprs Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -722,7 +722,21 @@ class IndexerCall extends AccessorCall, IndexerAccessExpr {
722722 * ```
723723 */
724724class ExtensionPropertyCall extends PropertyCall {
725- ExtensionPropertyCall ( ) { this .getProperty ( ) instanceof ExtensionProperty }
725+ private ExtensionProperty prop ;
726+
727+ ExtensionPropertyCall ( ) { this .getProperty ( ) = prop }
728+
729+ override Expr getArgument ( int i ) {
730+ if prop .isStatic ( )
731+ then result = super .getArgument ( i )
732+ else (
733+ // Shift arguments as the qualifier is an explicit argument in the getter/setter.
734+ i = 0 and
735+ result = this .getQualifier ( )
736+ or
737+ result = super .getArgument ( i - 1 )
738+ )
739+ }
726740
727741 override string getAPrimaryQlClass ( ) { result = "ExtensionPropertyCall" }
728742}
You can’t perform that action at this time.
0 commit comments