File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
python/ql/src/semmle/python/objects Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -637,6 +637,9 @@ class PythonFunctionValue extends FunctionValue {
637
637
ControlFlowNode getAReturnedNode ( ) { result = this .getScope ( ) .getAReturnValueFlowNode ( ) }
638
638
639
639
override ClassValue getAnInferredReturnType ( ) {
640
+ /* We have to do a special version of this because builtin functions have no
641
+ * explicit return nodes that we can query and get the class of.
642
+ */
640
643
result = this .getAReturnedNode ( ) .pointsTo ( ) .getClass ( )
641
644
}
642
645
}
@@ -652,6 +655,9 @@ class BuiltinFunctionValue extends FunctionValue {
652
655
override int maxParameters ( ) { none ( ) }
653
656
654
657
override ClassValue getAnInferredReturnType ( ) {
658
+ /* We have to do a special version of this because builtin functions have no
659
+ * explicit return nodes that we can query and get the class of.
660
+ */
655
661
result = TBuiltinClassObject ( this .( BuiltinFunctionObjectInternal ) .getReturnType ( ) )
656
662
}
657
663
}
You can’t perform that action at this time.
0 commit comments