Error highlighted on a Class which happens to have the same name as the namespace.

Issue #945 resolved
Mike Wannamaker created an issue

We are in a namespace 'cms'. We also have a class named 'CMS'. When I'm in a branch org which has the cms namespace in it, the IDE highlights the usages of these as errors.

Expected type Exception; found CMS.UnsupportedTypeException; Cannot resolve symbol 'CMS.UnsupportedTypeException'

Comments (2)

  1. Scott Wells repo owner

    Mike, I just tried to reproduce this and was unable to. Let me explain what I did...

    First, I have a managed package installed with namespace dlrs and have generated my OST so that its contents are available for code completion, reference injection, etc.

    Then I created a local class named Dlrs as follows:

    public with sharing class Dlrs
    {
        public static final String FOO = 'BAR';
    }
    

    and then I created the following method with references to the contents of both the Dlrs class and the dlrs namespace:

        public static void testIssue945()
        {
            System.debug(Dlrs.FOO);
            dlrs.RollupService.triggerHandler();
        }
    

    Code completion and reference injection/navigation worked as expected for both usages.

    Can you verify whether this problem is still occurring for you on the latest build? It's been almost four months since you logged this issue (sorry it took so long for me to get to it!), so it's very possible that I've addressed the underlying issue in one of the intervening sets of fixes.

    If you are still able to reproduce it, could you provide a simple, standalone example of how you reproduced it so that I can try to do the same?

  2. Scott Wells repo owner

    Mike, I'm going to go ahead and resolve this as unable to reproduce. If you do find it's reproducible, don't hesitate to reopen the issue and please include a standalone example if possible.

  3. Log in to comment