Apex validation error on methods without access modifiers

Issue #1882 resolved
Sander Otten created an issue

Bug encountered in Version 2.1.7.5 in the validation of anonymous apex files. The exact same code did not give any errors in Version 2.1.7.4.

When creating a method without access modifier in an anon apex file, the apex validator flags it as erroneous despite being syntactically correct. The problems window suggests the validator sees the method as a variable instead.

The code itself does still work when run against an org via the anonymous apex window.

Attached are snaps of the exact same bit of code in IC v2.1.7.4 and v2.1.7.5 respectively.

N.B. Methods WITH access modifier in anon apex code do seem to validate correctly.

Comments (3)

  1. Scott Wells repo owner

    There was a change to the Apex parser in 2.1.7.5 to fix some issues with body declarations in anonymous Apex. I'll take a look at this for the next build and make sure it's properly restored.

  2. Log in to comment