Skip to content

Commit

Permalink
Fix: class_property! macro
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbaddaden committed Jan 28, 2025
1 parent 8f18b0d commit 907b360
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/object.cr
Original file line number Diff line number Diff line change
Expand Up @@ -933,9 +933,9 @@ class Object
# ```
macro {{macro_prefix}}property!(*names)
\{% for name in names %}
::Crystal.def_var(\{{name}}, true)
::Crystal.def_getter!(\{{@type}}, \{{name}})
::Crystal.def_setter(\{{name}})
::Crystal.def_{{macro_prefix}}var(\{{name}}, true)
::Crystal.def_{{macro_prefix}}getter!(\{{@type}}, \{{name}})
::Crystal.def_{{macro_prefix}}setter(\{{name}})
\{% end %}
end

Expand Down

0 comments on commit 907b360

Please sign in to comment.