remove redundant cast where the type is enforced by an equality comparison

This commit is contained in:
Erik Krogh Kristensen
2021-10-28 18:08:20 +02:00
parent e75448ebb0
commit 15c90adec5
19 changed files with 26 additions and 30 deletions

View File

@@ -99,14 +99,14 @@ private ControlFlowNode get_a_call(Value callable) {
/** Gets the function object corresponding to the given class or function. */
FunctionObject get_function_or_initializer_objectapi(Object func_or_cls) {
result = func_or_cls.(FunctionObject)
result = func_or_cls
or
result = func_or_cls.(ClassObject).declaredAttribute("__init__")
}
/** Gets the function object corresponding to the given class or function. */
FunctionValue get_function_or_initializer(Value func_or_cls) {
result = func_or_cls.(FunctionValue)
result = func_or_cls
or
result = func_or_cls.(ClassValue).declaredAttribute("__init__")
}