AA0248 - Some inconsistencies with the "THIS" keyword
1. Describe the bug AA0248 cannot always be corrected using "THIS" keyword
2. To Reproduce Activate AA0248 at a minimum of warning level in ruleset.json
a) Issue in Report RequestPages:
b) Issues in TableExtensions, PageExtensions, ReportExtensions:
The same issue occurs with global variables in all extension objects.
3. Expected behavior Consistency between AL Compiler Warnings and what we can do in AL Language.
I think the confusion is greatest in Tables and TableExtensions between REC and THIS keywords... IntelliSense should stop showing invalid options for each of them.
4. Actual behavior AA0248 warnings not always can be fixed applying "THIS" keyword.
5. Versions:
- AL Language: 15.0.1433841 runtime: "15.1"
- Visual Studio Code: Versión: 1.101.0 (user setup) Confirmar: dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1 Fecha: 2025-06-11T15:00:50.123Z Electron: 35.5.1 ElectronBuildId: 11727614 Chromium: 134.0.6998.205 Node.js: 22.15.1 V8: 13.4.114.21-electron.0 SO: Windows_NT x64 10.0.22631
- Business Central: Versión: ES Business Central 26.1 (Plataforma 26.0.35441.0 + Aplicación 26.1.33404.35312)
- List of Visual Studio Code extensions that you have installed: N/A
- Operating System:
- [x] Windows
- [ ] Linux
- [ ] MacOS
Final Checklist
Please remember to do the following:
-
[x] Search the issue repository to ensure you are reporting a new issue
-
[x] Reproduce the issue after disabling all extensions except the AL Language extension
-
[x] Simplify your code around the issue to better isolate the problem
Hi, we just fixed this bug on the pre-release version, could you give that a try and let us know if it still reproes?
Closing as fixed. Reopen if it still repros in the latest pre-release version.
Hi again,
after update to the latest stable version of the released AL compiler 15.2.1630495 and upgrade the runtime of my project to version 15.2 all the reported Bugs in this issue raise again.