-
Notifications
You must be signed in to change notification settings - Fork 40
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
"Not in scope" warnings are shown even though the function/etc is defined in a parent component #556
Comments
Can you provide a sample project or zip reproducing the issue? Typically are valid issues, due to some OTHER scope not having the required imports. |
Will do... |
We see this one scattered enormously through our code base, but in creating an example, I realize it is due to us creating "Abstract Components" (or abstract derivations thereof). That is, the Abstract Component is invoking methods it expects to be defined in components that are extensions of the "Abstract Component". We do not create dummy (empty) definitions in the "Abstract Component" because, like all good compilers ;) , we want to have an error thrown at compile time. Regardless, I have attached an example as promised. simple-videoplayer-channel.zip grep -rin --include=*.brs "issues/556" |
Yeah, that's the exact issue I was expecting to see. So you currently have 2 options at this point:
I also just finished chatting with @chrisdp, and we think we have a way to make this slightly less annoying by using runtime checks. See rokucommunity/brighterscript#1121. Would something like that be acceptable? |
"Not in scope" warnings are underlined in code and percolated to file explorer even thought the definition is in scope in a parent component ( ie. current component defined as extending a parent, and so on up the derivation chain.)
The text was updated successfully, but these errors were encountered: