System Class Overrides Local Class Code Inspection With Identical Name

Issue #2165 resolved
Florian Sening created an issue

For whatever reason, I have a couple of classes (in one project) that do have the same name as a class in the System namespace. This confuses the hell out of Illuminated Cloud as it assumes that I’m using the global class when I’m actually using the local class.

It’s really easy to reproduce. Just create e.g. an Address class with a format() method. Now for example also add a test class AddressTest that will test this method. (See the screenshot for how it looks.)

The format() method is all red because Illuminated Cloud assumes I’m using System.Address where this does not exist.

It’s not a super important issue but really annoying when I’m working on those parts. Hopefully, it’s easy to fix. Thanks mate!

Comments (3)

  1. Scott Wells repo owner

    Hi, Florian. I'm not seeing that behavior:

    Issue_2165.png

    Note that the getSObjectType() method is where I had to resolve a very similar issue with resolution of a custom type with the same as a system type in an implicit namespace (e.g., System) previously.

    Can you think of anything I'm doing differently than you that might result in the different results here? are you able to put together a super simple standalone project that reproduces this for you? I know it would likely just be the two classes in these images, but since that's not doing it for me, I figured I'd ask if it happens to you in a standalone project.

  2. Scott Wells repo owner

    Issue tracker grooming. If this is still an issue, please feel free to reopen, ideally with a concrete reproduction scenario.

  3. Log in to comment