File tree Expand file tree Collapse file tree 2 files changed +1
-6
lines changed
main/java/org/sonar/python/tree
test/java/org/sonar/python/semantic/v2 Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -189,9 +189,6 @@ public PythonType typeV2() {
189
189
if (callee ().typeV2 () instanceof ClassType classType ) {
190
190
return new ObjectType (classType );
191
191
}
192
- if (callee ().typeV2 () instanceof FunctionType functionType ) {
193
- return new ObjectType (functionType .returnType ());
194
- }
195
192
return PythonType .UNKNOWN ;
196
193
}
197
194
}
Original file line number Diff line number Diff line change @@ -574,7 +574,6 @@ void annotation_without_reassignment() {
574
574
}
575
575
576
576
@ Test
577
- @ Disabled ("ObjectType[PythonType.UNKNOWN] should just be PythonType.UNKNOWN" )
578
577
void call_expression () {
579
578
assertThat (lastExpression (
580
579
"f()" ).typeV2 ()).isEqualTo (PythonType .UNKNOWN );
@@ -607,14 +606,13 @@ def foo(): a
607
606
}
608
607
609
608
@ Test
610
- @ Disabled ("Flow insensitive type inference scope issue" )
611
609
void variable_outside_function_3 () {
612
610
assertThat (lastExpression (
613
611
"""
614
612
def foo():
615
613
a = 42
616
614
a
617
- """ ).type ()).isEqualTo (PythonType .UNKNOWN );
615
+ """ ).typeV2 ()).isEqualTo (PythonType .UNKNOWN );
618
616
}
619
617
620
618
@ Test
You can’t perform that action at this time.
0 commit comments