perlang-org / perlang

The Perlang Programming Language
https://perlang.org
MIT License
16 stars 1 forks source link

(compiler) Detect method being redefined #464

Closed perlun closed 4 months ago

perlun commented 4 months ago

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.