Describe the bug
Throwing error while change const in this file. Not related to Radon exception.
Screenshots or Code snippets
Code:
tests/classes.rn file.
static const c = "i am static const" # line:26
c = "i am static var" # line: 27
Error:
Traceback (most recent call last):
File "***/radon/radon.py", line 61, in <module>
(result, error, should_exit) = base_core.run(
^^^^^^^^^^^^^^
File "***/radon/core/builtin_funcs.py", line 527, in run
result = interpreter.visit(ast.node, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "***/radon/core/interpreter.py", line 14, in visit
return method(node, context)
^^^^^^^^^^^^^^^^^^^^^
File "***/radon/core/interpreter.py", line 37, in visit_ArrayNode
elements.append(res.register(self.visit(element_node, context)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "***/radon/core/interpreter.py", line 14, in visit
return method(node, context)
^^^^^^^^^^^^^^^^^^^^^
File "***/radon/core/interpreter.py", line 424, in visit_CallNode
return_value = res.register(value_to_call.execute(args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "***/radon/core/builtin_funcs.py", line 42, in execute
return_value = res.register(method(exec_ctx))
^^^^^^^^^^^^^^^^
File "***/radon/core/builtin_funcs.py", line 480, in execute_require
f'Failed to finish executing script "{module}"\n' + error.as_string(),
^^^^^^^^^^^^^^^^^
File "***/radon/core/errors.py", line 101, in as_string
result = self.generate_traceback()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "***/radon/core/errors.py", line 113, in generate_traceback
result = f" File {pos.fn}, line {str(pos.ln + 1)}, in {ctx.display_name}\n" + result
^^^^^^
AttributeError: 'NoneType' object has no attribute 'fn'
Describe the bug Throwing error while change
const
in this file. Not related to Radon exception.Screenshots or Code snippets Code:
tests/classes.rn
file.Error:
Additional context A issue with OOP.