rokucommunity / brighterscript

A superset of Roku's BrightScript language
MIT License
152 stars 47 forks source link

callfunc doesn't work with no args defined #857

Closed kbunch closed 3 months ago

kbunch commented 11 months ago

ex:

function test() .. end function

node@.test()

TwitchBronBron commented 11 months ago

Take a look at the docs for the callfunc operator, that might help clear a few things up.

https://github.com/rokucommunity/brighterscript/blob/master/docs/callfunc-operator.md#callfunc-evaluation-with-no-arguments

kbunch commented 11 months ago

@TwitchBronBron when/where does this happen? we use callFunc with no params all over the place in our code

TwitchBronBron commented 11 months ago

This happened consistently when brighterscript was first released (around 2019). Recently I've been hearing that it's no longer an issue, we just haven't gotten around to doing full testing and updating brighterscript to remove this requirement.

I'd be open to reviewing a PR that adds a bsconfig.json option for disabling this feature on a per-project basis if you're interested?

kbunch commented 11 months ago

@TwitchBronBron I'd be interesting it adding a PR once we get into it. Right now evaluating it to see if we want to use it on a large project. Right now we are all vanilla Brightscript.

TwitchBronBron commented 3 months ago

The v1 branch has removed this requirement, so I'm going to close this as we'll eventually "fix" it.