EngineHub / EngineHub/CommandHelper

Static analysis exception "Procedure cannot be resolved" when procedure exists

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

Description

Static analysis will throw exception with message "Procedure cannot be resolved" for all user procedures in this case:
```
# main.ms
proc _path() {
return('test-2.ms')
}

proc _test() {
console('test')
}

include('test-1.ms')
```
```
# test-1.ms
include(_path())
```
```
# test-2.ms
_test()
```
```
ms.lang.IncludeException: There was a compile error when trying to include the script at C:\Users\A-y57\Dev\minecraft\plugins\CommandHelper\test-2.ms
Procedure cannot be resolved: _test :: test-2.ms:1
at <>:C:\Users\A-y57\Dev\minecraft\plugins\CommandHelper\test-1.ms:1.9
at <>:C:\Users\A-y57\Dev\minecraft\plugins\CommandHelper\main.ms:9.2
```
If replace _path with 'test-2.ms' - everything works
If disable static analysis, everything works

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.