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

@. callfunc shorthand results in wrong cannot find function name diagnostic #205

Closed
georgejecook opened this issue Oct 11, 2020 · 1 comment · Fixed by #209
Closed

@. callfunc shorthand results in wrong cannot find function name diagnostic #205

georgejecook opened this issue Oct 11, 2020 · 1 comment · Fixed by #209
Labels
bug Something isn't working

Comments

@georgejecook
Copy link
Contributor

this .bs code:

      childRail@.initializeWithRiversJson(childRail.riversJson)

reports diagnostic : brs1001 - Cannot find function with name 'childRail' when this file is included in scope 'source'
transpilation still succeeds, as this screenshot shows.

image

I've had a look at the code; but not sure how best to deal with this to workaround it.. not sure if it should even be in the functionExpressions references, as it's a callfun expression, or if it should just get filtered out of the response from findFunctionCalls

@georgejecook georgejecook added the bug Something isn't working label Oct 11, 2020
@TwitchBronBron
Copy link
Member

Just a clarification: functionExpressions is a list of functions, not function calls, so the statement "not sure if it should even be in the functionExpressions references" doesn't make much sense.

However, you are correct, CallfuncExpressions should be excluded from the parser's callExpressions list (the results of findFunctionCalls). Good find.

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

Successfully merging a pull request may close this issue.

2 participants