<ua_> I kinda wonder why he's set on compiled language
From IRC (bridge bot)
@FromIRC
<kevinsjoberg> Is this a bug or not? https://play.crystal-lang.org/#/r/bjk8 I know @Blacksmoke16 was playing around with this a bit yesterday, but I don't know for a fact if its a bug or a limitation. Would like to try fix it if its a bug.
<kevinsjoberg> Perhaps I should fail it as a bug in upstream and see what the outcome is?
<kevinsjoberg> file*
Kirk Haines
@wyhaines
Your add_b does work. What fails is actually the puts.
Add a macro line to show you B after you assign to it:
{%
B[key] = { type:@type.name, value: value }
pp B
%}
You will see that data is being added.
What is failing is the non-macro access to either A::B or C::B.
From IRC (bridge bot)
@FromIRC
<kevinsjoberg>@wyhaines, sorry I should have been clear. Yes, the macro works. I know the puts is the culprit, but I'd still expect it to work.
From IRC (bridge bot)
@FromIRC
<kevinsjoberg> Why is it breaking upon trying to access the constant at runtime?