Cannot Resolve Symbol - Field class

Issue #1613 new
August Detlefsen created an issue

I have an Apex class called 'Field' defined in my 'classes' directory, but IlluminatedCloud is saying that it cannot resolve the symbol.

Per Scott Wells:

That's almost certainly because ‘Field’ is also an Apex reserved word.

Comments (4)

  1. Scott Wells repo owner

    August, I'm actually unable to reproduce this:


    Can you do me a favor and regenerate your OST to see if that resolves the issue?

  2. Jonny Power

    August - are you developing in a scratch org with a namespace by any chance? If so, does your offline table have a Field.cls in a namespaced subdirectory?

    I've found the symbol tree to get tricked in multi-module projects against namespaced DX orgs, where IC2 expects the class to be referenced by namespace if it has a symbol in the namespace subfolder. This is typically only a problem for classes defined in a module outside of the default module referencing other classes defined outside the default module.

    It's hacky but we've added a build process hook into intellij that clears these symbols from the offline symbol table to get around this.

  3. Scott Wells repo owner

    Jonny, do you mind reaching out to me directly to help me understand this workaround you've had to implement a bit more. I want to make sure that I fix it and you don't have to implement such a workaround. If you've already reported it somewhere, my apologies for letting it slip off my radar; just send me the issue number.

  4. Log in to comment