You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining variables in Kipper, there are currently no checks ensuring that their identifiers do not overwrite target-specific identifiers (for example function in TypeScript) or even internal Kipper functions, which provide functionality for Kipper keywords.
This results in undefined behaviour and runtime errors when executing or transpiling such code.
Expected Behavior
When declaring/defining a new variable, the target should run a semantic check asserting the identifier that is used does not overwrite any target-specific keywords or internal Kipper functions (The identifiers of internal Kipper functions are chosen by each target, so the target has to check for both).
Steps To Reproduce
Create a Kipper program with target typescript.
Define a new variable in the program with an identifier that matches a keyword from TypeScript/JavaScript or overwrites an internal function (for example __numToStr() which will be introduced in v0.8.0)
Environment
Kipper: 0.8.0-beta.0
Environment: Node.js 16.15.0
Operating System: Arch Linux 2022.06.01 with Linux 5.15.44-1-lts x86_64
The text was updated successfully, but these errors were encountered:
Luna-Klatzer
changed the title
[Bug] Internal Kipper identifiers and target-specific keywords can be overwritten by user definitions
[Bug] Internal Kipper identifiers and target-specific reserved identifiers/keywords can be overwritten by user definitions
Jun 5, 2022
Is there an existing issue for this?
I am following the documentation's guide
This issue exists in the latest version
Current Behavior
When defining variables in Kipper, there are currently no checks ensuring that their identifiers do not overwrite target-specific identifiers (for example
function
in TypeScript) or even internal Kipper functions, which provide functionality for Kipper keywords.This results in undefined behaviour and runtime errors when executing or transpiling such code.
Expected Behavior
When declaring/defining a new variable, the target should run a semantic check asserting the identifier that is used does not overwrite any target-specific keywords or internal Kipper functions (The identifiers of internal Kipper functions are chosen by each target, so the target has to check for both).
Steps To Reproduce
typescript
.__numToStr()
which will be introduced in v0.8.0)Environment
The text was updated successfully, but these errors were encountered: