Auto Completion doesn't recognise "private" test visible Members

Issue #2641 resolved
Jason Van Beukering created an issue

Since the last release of IC, when writing code, class members that are marked “private” but “@TestVisible” are not offered.

Personally I think they should always be “offered” but depending on context (i.e. the calling code is a unit test vs somewhere else) they are indicated differently (say grey for unreachable code)

Comments (8)

  1. Scott Wells repo owner
    • changed status to open

    Oh no. Assuming that's the case, that would be an unintentional side-effect of some of the code completion improvements/fixes I implemented. I'll try to reproduce today and, assuming I can, I'll implement a fix for the next build (or earlier if a hotfix is warranted). Thanks for reporting!

  2. Jason van Beukering

    This class replicates the problem…

    public with sharing class ExampleClass
    {
       @TestVisible
       private static void doSomething()
       {
    
       }
    }
    

  3. Scott Wells repo owner

    Jason, I’m not seeing an issue with the provided file now:

    Am I perhaps doing something wrong when trying to reproduce it?

  4. Jason van Beukering

    Sigh, I'm being a bit of an Idiot :( Blame it on the flu... I was testing outside of the context of a test class. Apologies.

    Kind Regards Jason van Beukering

  5. Scott Wells repo owner

    No issues! Sorry you’re sick. I picked up something at Dreamforce – pretty sure it was COVID, but I never tested positive for it – and have been pretty puny for the past couple of weeks myself. Best of luck recovering!

  6. Log in to comment