2
Views
5
Comments
Local variable warnings after V 10 upgrade
Question

Hello,

In after upgrading to V10 in my code I am seeing that most of the local variables are unused.

I remember I have used these local variables somewhere in code but now it's showing unused. 

Why this happens?

Thanks and Regards,

Suraj Borade

2016-11-20 11-27-52
João Neves

Hi Suraj,

This is a new feature of version 10. The warning appears when some (non-public) action, variable, ... is not being used elsewhere in the module and can be safely deleted.

Please confirm that those variables aren't really being used. If you see usages please report it using submit feedback in Service Studio.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Also, it is pretty easy to check whether they are actually used: either select the variable and press F12 to find references, or delete it and see whether TrueChange objects.

2018-11-06 14-26-44
Suraj Borade

Now when I check usages using F12, they are not used anywhere. If I delete them, there are no error messages on TrueChange objects. But those warnings were not there before version 10 upgrade. 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

No, these warnings didn't exists in P9 and before. These are new P10 warnings, which imho are very helpfull!

2016-11-03 14-54-00
Vlad Gets

thanks Kilian

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.