# Buggy code
def __init__(self, variable_left, variable_right, result):
    assert is_valid_rvalue(variable_left) or isinstance(variable_left, (Contract, Enum))
    assert isinstance(variable_right, Constant)
    assert isinstance(result, ReferenceVariable)
    super().__init__()
    self._variable_left = variable_left
    self._variable_right = variable_right
    self._lvalue = result
    self._gas = None
    self._value = None


# Traceback (AssertionError)
ERROR:root:Error in .\function_members.sol
ERROR:root:Traceback (most recent call last):
File "c:\users\x\documents\github\slither\slither\__main__.py", line 610, in main_impl
(slither_instances, results_detectors, results_printers, number_contracts) = process_all(filename, args,
File "c:\users\x\documents\github\slither\slither\__main__.py", line 67, in process_all
(slither, current_results_detectors, current_results_printers, current_analyzed_count) = process_single(
File "c:\users\x\documents\github\slither\slither\__main__.py", line 53, in process_single
slither = Slither(target,
File "c:\users\x\documents\github\slither\slither\slither.py", line 86, in __init__
self._parser.analyze_contracts()
File "c:\users\x\documents\github\slither\slither\solc_parsing\slitherSolc.py", line 345, in analyze_contracts
self._convert_to_slithir()
File "c:\users\x\documents\github\slither\slither\solc_parsing\slitherSolc.py", line 489, in _convert_to_slithir
func.generate_slithir_and_analyze()
File "c:\users\x\documents\github\slither\slither\core\declarations\function.py", line 1652, in generate_slithir_and_analyze
node.slithir_generation()
File "c:\users\x\documents\github\slither\slither\core\cfg\node.py", line 702, in slithir_generation
self._irs = convert_expression(expression, self)
File "c:\users\x\documents\github\slither\slither\slithir\convert.py", line 64, in convert_expression
visitor = ExpressionToSlithIR(expression, node)
File "c:\users\x\documents\github\slither\slither\visitors\slithir\expression_to_slithir.py", line 103, in __init__
self._visit_expression(self.expression)
File "c:\users\x\documents\github\slither\slither\visitors\expression\expression.py", line 51, in _visit_expression
self._visit_call_expression(expression)
File "c:\users\x\documents\github\slither\slither\visitors\expression\expression.py", line 108, in _visit_call_expression
self._visit_expression(expression.called)
File "c:\users\x\documents\github\slither\slither\visitors\expression\expression.py", line 95, in _visit_expression
self._post_visit(expression)
File "c:\users\x\documents\github\slither\slither\visitors\expression\expression.py", line 289, in _post_visit
self._post_member_access(expression)
File "c:\users\x\documents\github\slither\slither\visitors\slithir\expression_to_slithir.py", line 318, in _post_member_access
member = Member(expr, Constant(expression.member_name), val)
File "c:\users\x\documents\github\slither\slither\slithir\operations\member.py", line 14, in __init__
assert is_valid_rvalue(variable_left) or isinstance(variable_left, (Contract, Enum))
AssertionError

# Fixed code
def __init__(self, variable_left, variable_right, result):
    # Function can happen for something like
    # library FunctionExtensions {
    #     function h(function() internal _t, uint8) internal {  }
    # }
    # contract FunctionMembers {
    #     using FunctionExtensions for function();
    #
    #     function f() public {
    #         f.h(1);
    #     }
    # }
    assert is_valid_rvalue(variable_left) or isinstance(
        variable_left, (Contract, Enum, Function)
    )
    assert isinstance(variable_right, Constant)
    assert isinstance(result, ReferenceVariable)
    super().__init__()
    self._variable_left = variable_left
    self._variable_right = variable_right
    self._lvalue = result
    self._gas = None
    self._value = None