issue when defrecord
field names have the same names as internal method names
#758
Labels
component:basilisp.core
Issue pertaining to basilisp.core namespace
issue-type:bug
Something isn't working
Hi,
there appears to be an issue with
defrecord
when any of the field names have the same name as any of thedeftype
methods it implements, e.g. the:seq
field in the below comes back as an bounded method#basilisp.pprint.Person{:c 2 :seq <bound method Person.seq of Person(b=1, c=2, meta=3, _recmap={})> :b 1}
To reproduce
seq
fieldseq
field is bound to a fn rather than the passed in value of 1, and the rest of the values are shiftedThis is arises due to the definition of
Person
as a type with aseq
method, amongst other methods which result to the same issue, as evident in the below macroexpansion.Any ideas how easy would be to fix this, if at all possible?
The text was updated successfully, but these errors were encountered: