apex-dev-tools / apex-ls

Apex language server library
Other
2 stars 1 forks source link

Missing restrictions on methods #288

Closed nawforce closed 2 weeks ago

nawforce commented 2 months ago

I have noticed a couple of missing restriction on methods that could do with addressing as each method is validated.

On abstract global classes all abstract methods must be global as well Protected methods are only allowed on virtual/abstract classes

As part of the work on https://github.com/apex-dev-tools/apex-ls/issues/285 it would also be useful to error on private virtual/abstract methods as well so we don't have to consider these when constructing method maps.

In each case, to avoid cascading errors, it's best to adjust the method declaration to hide the issue downstream, e.g. upgrade non-global abstracts to globals.