You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when a function is declared but not called the language server emits the warning XDeclaredButNotUsed however for recursive functions, since the function calls itself this warning is not emitted. It seems that this warning should still be emitted though since if the only place where a function is called is in itself then it still isn't "used" as there is no possible way for it to ever actually be called or even meaningfully included in the final executable.
Steps to reproduce:
create a new file (or use an existing one).
write a recursive function such as:
"proc a(b: int)=
if b == 0: return false
else: return a(b-1)"
observe that the language server does not provide the XDeclaredButNotUsed warning even though this function is never called from outside of itself and isn't publicly accessible from other files (and doesn't have the used pragma or any other reason not to emit the warning).
The text was updated successfully, but these errors were encountered:
when a function is declared but not called the language server emits the warning XDeclaredButNotUsed however for recursive functions, since the function calls itself this warning is not emitted. It seems that this warning should still be emitted though since if the only place where a function is called is in itself then it still isn't "used" as there is no possible way for it to ever actually be called or even meaningfully included in the final executable.
Steps to reproduce:
"proc a(b: int)=
if b == 0: return false
else: return a(b-1)"
The text was updated successfully, but these errors were encountered: