Closed diakopter closed 3 years ago
Ah, you are calling System.puts
during compile-time initialization.
That's a problem (right now) because the compiler will resolve System.puts
to the implementation in the Linux platform code and it tries to do things with pointers which are not allowed at compile time.
Do you want to do this a lot? If so, I can think about how to support one version of System
at compile time and one version at runtime.
Not really. Just trying things out and copied the example from the tutorial (and wiki) docs. :)
Multiple stages is nice. Side effects not necessary. Curious about how nested data structures cross over from initialization to run-time.
Ah, thanks for pointing this out. I should update the wiki example.
By nested, you just mean an object graph? The compiler serializes everything reachable from the (used) component fields of the program after init. It traces the code starting from main and does tree shaking to toss everything not used.
is it supposed to still work?