Closed oconnor0 closed 11 months ago
Hah, interesting.. the problem is created by literal:value
which can't work, because you've used struct
for all of these, which are by value inline, but somehow the typechecker doesn't mind you constructing an Int
there and then the codegen falls over :)
It should disallow substituting a subclass for a struct
. Let me see what is the best way to error that.
You may want to use class
for building up an AST.
I am actually going to fix this by:
abstract
on struct
But I'll do that this weekend.. for now, just use class
for the AST :)
Awesome, thanks!
All the above has been implemented.
I noticed https://github.com/aardappel/lobster/blob/master/dev/TODO.txt#L394-L397 and so figured I'd take a stab at it, at least for myself, since Lobster looked interesting and I wanted to learn it. But I got this crash log:
While running this code:
I just start it up and hit "enter" and get the crash. I'm on Windows 10 and am using https://github.com/aardappel/lobster/releases/tag/v2023.11