Cupcake-Compiler
Cupcake-Compiler copied to clipboard
"Internal Compiler Error" when returning from void function
This code:
#import "modules/Print.jai"
test :: () {
print("Hello");
return;
print(" world");
}
main :: () {
test();
}
#run main()
run with cupcake mytest.jai
produces this error:
Cupcake (v0.1-alpha)
Assertion failed at ..\src\ssa\ssa_realloc.cpp:406 inside coloring_spill_find
Condition: false
Internal Compiler Error : Invalid Code Path
Looks like return;
crushes interpreter.
Also output.cpp is not compiling because a lot of undeclarated indetifiers stuff.
I don't have the source code for the currently release version available, which makes the debugging hard. The positive thing is that the newer version (not publicly released yet) runs this code without problem.
I don't think this bug is very imported but if you disagree please say so, and I can release the newer version.
Also output.cpp is not compiling because a lot of undeclarated indetifiers stuff.
Does this only happen in this case?
It happen even in this simple hello-world example:
#import "modules/Print.jai"
main :: () {
print("Hello, Cupcake!");
}
#run main()
Output: output.cpp errors in output.cpp (most of it is just warnings, but there is 5 errors "use of undeclared identifier")
I would be happy to see newer version! 😄