AS0022 raises errors for obsolete objects/procedures
1. Describe the bug
AS0022 raises an error when the scope of an object or a procedure changes, even if the element as been marked as obsolete in the previous version.
The exact error is: error AS0022: The external scope in '***' cannot be removed or changed to 'internal' because it will break dependent extensions. Note that adding an access modifier ('local', 'protected', or 'internal') overrides the argument in 'Scope'.
To bypass the error, you just have to change the name of the procedure or the name+id of the object. It is not really consistant. This is a revival of a previous bug: https://github.com/microsoft/AL/issues/5870
2. To Reproduce See: https://github.com/microsoft/AL/issues/5870
3. Expected behavior We should be able to change the scope of something marked obsolete. Of course it can break extensions, but as we are allowed to remove the element, the point is not relevant.
4. Actual behavior AS0022 seems to ignore obsolete attributes.
5. Versions:
- AL Language: 13.0.14.54431
- Visual Studio Code: get this error by running alc.exe directly (no extension)
Related open issue, but about setting enums to internal: #7700.