-
Notifications
You must be signed in to change notification settings - Fork 276
Open
Description
1. Describe the bug
When using Quick Fix to add a missing using statement for a namespace to the top, the function should place it alphabetically as requested by AL0897 in case AL0897 is active.
2. To Reproduce
- Create an object C in namespace Favorite.C
- Create an object B in namespace Favorite.B
- Create an object A in namespace Favorite.A
- Create procedure X in namespace A.
- Create a local variable: TheC: Codeunit C;
- Create a local variable: TheB: Codeunit B;
- Click the bulb left to the error for Codeunit C (AL0185 Codeunit 'C' is missing), select Add 'using Favorite.C'
- Click the bulb left to the error for Codeunit B (AL0185 Codeunit 'B' is missing), select Add 'using Favorite.B'
namespace Favorite.C;
codeunit 5147567 C
{
}
namespace Favorite.B;
codeunit 5147568 B
{
}
namespace Favorite.A;
// These are added when following the steps
//using Favorite.C;
//using Favorite.B;
codeunit 5147569 A
{
local procedure X()
var
TheC: Codeunit C;
TheB: Codeunit B;
begin
Clear(TheC);
Clear(TheB);
end;
}3. Expected behavior
If rule AL0897 is active (Using statements are not ordered alphabetically), then the using statement has to be added in order to avoid this additional problem.
4. Actual behavior
The new using statement is placed below the last using statement.
5. Versions:
- AL Language: 17.0.2037090
- Visual Studio Code: 1.108.2
- Business Central: 27.3
- Operating System:
- Windows
- Linux
- MacOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels