Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]:定数のスコープが漏れる #112

Closed
taiseiue opened this issue Dec 10, 2023 · 2 comments
Closed

[BUG]:定数のスコープが漏れる #112

taiseiue opened this issue Dec 10, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@taiseiue
Copy link
Member

不具合の説明
constキーワードを使って定義した定数がスコープ外からアクセスできてしまう。

再現手順
不具合を再現するための手順

if(true)
{
   const ABC = "ABC";
}
print(ABC); //出力 : ABC

期待する動作

if(true)
{
   const ABC = "ABC";
}
print(ABC); // エラーになるべき

補足
そろそろ定数と読み取り専用の変数を一本化してもいいかも

@taiseiue taiseiue added the bug Something isn't working label Dec 10, 2023
@taiseiue
Copy link
Member Author

constreadonlyの意味を同じにした

taiseiue added a commit that referenced this issue Dec 16, 2023
@taiseiue
Copy link
Member Author

const => var readonlyに修正

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant