AL0885 false positive with table and table extension in another repo
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
1. Describe the bug
AL0885 shows a false positive with table (here Purchase Line) and table extension (here "Mfg. Purchase Line") are both in another repo and in fact are one table.
The field '"Prod. Order No."' cannot be referenced in this context. You can only reference symbols from the base object 'Purchase Line' and the current extension. This warning will become an error when targeting a runtime with version '18.0' or higher.
2. To Reproduce
Create a new app and add the following object. Review generated diagnostic/problems.
tableextension 50000 "XXX YYY Purchase Line" extends "Purchase Line"
{
keys
{
key(XXXProductionOrder; "Prod. Order No.", "Prod. Order Line No.", "Operation No.")
{
}
}
}
3. Expected behavior
All mentioned key fields reside in Base Application and form the base table Purchase Line. No Warning or future error should be raised.
4. Actual behavior
All mentioned key fields reside in Base Application but are placed in a table and a table extension object, causing the false positive which is wrong.
5. Versions:
- AL Language: 18.0.2293710
- Visual Studio Code: 1.118.1
- Business Central: 27.5
- Operating System:
- Windows
- Linux
- MacOS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing AL0885 in a new app using the tableextension example and inspect the generated diagnostic in Visual Studio Code. Trace how fields from a base table and its extension in another repo are resolved; done means the listed key fields no longer produce a warning or future error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100