AL0885 false positive with table and table extension in another repo
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
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.
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
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
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.
More from microsoft/AL
-
accepted al-tools bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
AL 18.0.2732683 regression: System.Drawing types cannot be resolved from assembly probing paths Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
accepted packaging
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/eo#8869 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
EricSpencer00/Resilient#4824 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/jeo-maven-plugin#1758 ·
-
generics
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
mlir
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
llvm/llvm-project#224908 · 1 comment ·