habitat
habitat copied to clipboard
Super wonky compile error when using "settings" instead of "setting"
This code:
MyHabitatThing.create do
settings anything : String
end
Causes this error:
There was a problem expanding macro 'create_settings_methods'
Code in macro 'finished'
1 | Habitat.create_settings_methods(MyHabitatThing)
^
Called macro defined in lib/habitat/src/habitat.cr:239:3
239 | macro create_settings_methods(type_with_habitat)
Which expanded to:
> 8 | # Generates a hash using the provided values
> 9 | def self.to_h
> 10 | {
^
Error: for empty hashes use '{} of KeyType => ValueType'