This has been an oversight while working on the experimental Perlang compiler (https://github.com/perlang-org/perlang/issues/406). The bug was discovered when implementing the changes in https://github.com/perlang-org/perlang/pull/463; when we started running one of those tests, no error was emitted even though the code was redefining a top-level function. It turned out that the compiler would silently overwrite a function if you defined it twice.
This has been an oversight while working on the experimental Perlang compiler (https://github.com/perlang-org/perlang/issues/406). The bug was discovered when implementing the changes in https://github.com/perlang-org/perlang/pull/463; when we started running one of those tests, no error was emitted even though the code was redefining a top-level function. It turned out that the compiler would silently overwrite a function if you defined it twice.