Attempting to compile an infinitely recursive macro provides little feedback to the developer.
macro foo
foo
end
foo
Stack overflow (e.g., infinite or very deep recursion)
[0x7f366bf645e6] ???
[0x7f366beb3292] ???
[0x7f366cd31b91] ???
md5-5720f45ccb85548e6dd032156bf91b53
Crystal 0.34.0 [4401e90f0] (2020-04-06)
LLVM: 8.0.0
Default target: x86_64-unknown-linux-gnu
md5-8d4a3d28ffda5733a2da4f693d372791
There was a problem expanding macro 'foo'
Code in src/test.cr:5:1
5 | foo
^
Error: expansion of macro 'foo' resulted in stack overflow (e.g, infinite or very deep recursion)
Duplicate of https://github.com/crystal-lang/crystal/issues/8410?
Not a duplicate. Macro evaluation should probably have a max depth. I'm not sure.
Most helpful comment
Not a duplicate. Macro evaluation should probably have a max depth. I'm not sure.