EngineHub / EngineHub/CommandHelper

Incorrect [Using undefined variable] error on unassigned variable declarations in autoconcat (non-strict mode)

Open
#1,179 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
128
Forks
70
PR merge metrics
No merged PRs in 30d

Description

When having variable declarations in a script where that variable might never be assigned to, then an incorrect `Using undefined variable: @var` runtime error is given if that declaration is inside an autoconcat.
Example code:
```
string @var;
msg();
```

Problem:
__autoconcat__() gets the value of declaration `string @var`, causing this runtime error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.