there's an issue when accessing some object property names with interop that match builtins names, such as str
"AttributeError: type object 'xyz' has no attribute 'str_'"
To reproduce
Open up the REPL and create an object from a class that has a property with the name str
try to access the property using interop, it errors out
basilisp.user=> (.-str x)
Traceback (most recent call last):
File "C:\src\basilisp\src\basilisp\cli.py", line 447, in repl
result = eval_str(lsrc, ctx, ns, eof)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\src\basilisp\src\basilisp\cli.py", line 46, in eval_str
last = compiler.compile_and_exec_form(form, ctx, ns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\src\basilisp\src\basilisp\lang\compiler\__init__.py", line 191, in compile_and_exec_form
return getattr(ns.module, final_wrapped_name)()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<REPL Input>", line 1, in __lisp_expr___74
AttributeError: type object 'xyz' has no attribute 'str_'
The same succeeds for abc property whose name is not the same as a builtin identifier
Hi,
there's an issue when accessing some object property names with interop that match builtins names, such as
str
"AttributeError: type object 'xyz' has no attribute 'str_'"To reproduce
str
The same succeeds for
abc
property whose name is not the same as a builtin identifierPR to follow.