Parser fails on instantiating local class inside trigger
Issue #2052
resolved
Hello,
I have some projects with existing code where an Apex Trigger contains a Class definition, and the Class is instantiated in the (same) Trigger. The code compiles fine, but the parser marks it as invalid:
(The discussion is not about “don't put classes inside triggers” )
Comments (3)
-
repo owner -
repo owner Fixes committed for the next build. Turns out that IC2's Apex parser was just fine with this, but there were issues with reference resolution for inner types in trigger files. That should all work properly as of the next build.
-
repo owner - changed status to resolved
Delivered in 2.2.1.3.
- Log in to comment
Don't put classes inside triggers.
Okay...had to say that, but if this is allowed Apex syntax, IC2 should support it...though I may also add a code inspection that chastises the user for doing so! I'll take a look. Hopefully it'll be a pretty simple parser update.