[BUG REPORT] Functions inside functions
Math-O5 opened this issue · comments
Mathias Fernandes Duarte Coelho commented
Describe the bug
Sim-C is wrongly allowing declarations of function inside function, but C does not accept it.
To Reproduce
Sim-C code:
fun joy( ) {
// This function should not be allowed, stop this evil behavior
fun evil ( ) {
}
}
MAIN
// This function should not be allowed here, stop this evil behavior
fun evil_two( ) {
}
END_MAIN
Output: C code!
Expected behavior
Throw a message error to user.
Please, follow the CONTRIBUTION.md instructions.
Siddhartha Dhar Choudhury commented
Merged #421.