Summary
Audit all syntax-level analyzers for correct handling of the four AL record-method receiver forms. Issue #343 showed AC0032 produced a false positive because it did not recognise the this. self-reference keyword. Other analyzers that pattern-match method receivers at the syntax level may have the same blind spot.
The four receiver forms
A record (table data) method such as Modify can reach a record through four syntactic forms:
MyTable.Modify() — named variable receiver
Rec.Modify() — implicit Rec (normal identifier)
Modify() — bare implicit self (no receiver)
this.Modify() — this self-reference keyword (ThisExpressionSyntax, runtime 14.0 / BC 2024 wave 2)
Key symbol-shape gotcha: a table object's declared symbol is an ITableTypeSymbol, which is not an IRecordTypeSymbol; the record (Rec/this) is a separate IRecordTypeSymbol wrapper. ThisExpressionSyntax does not exist in the netstandard2.1 SDK and must be guarded with #if !NETSTANDARD2_1.
Scope (triage only)
For each analyzer that inspects method-call receivers at the syntax level (i.e. via IdentifierNameSyntax / MemberAccessExpressionSyntax / InvocationExpressionSyntax rather than the operation tree), determine whether all four forms are handled, and record findings. Candidate starting points (non-exhaustive, to be confirmed during the audit):
ALCops.FormattingCop — CasingMismatchIdentifier
ALCops.LinterCop — ApiPageCanonicalFieldNameGuide
ALCops.PlatformCop — PartialRecordOperations, UseValidateForFieldAssignment, FlowFilterFieldAssignment, IsHandledParameterAssignment, TableRelationFieldLength, TransferFieldsSchemaCompatibility
This issue is audit/triage only — do not prescribe or implement fixes here. Each confirmed gap should get its own follow-up issue.
Reference
Summary
Audit all syntax-level analyzers for correct handling of the four AL record-method receiver forms. Issue #343 showed AC0032 produced a false positive because it did not recognise the
this.self-reference keyword. Other analyzers that pattern-match method receivers at the syntax level may have the same blind spot.The four receiver forms
A record (table data) method such as
Modifycan reach a record through four syntactic forms:MyTable.Modify()— named variable receiverRec.Modify()— implicitRec(normal identifier)Modify()— bare implicit self (no receiver)this.Modify()—thisself-reference keyword (ThisExpressionSyntax, runtime 14.0 / BC 2024 wave 2)Key symbol-shape gotcha: a table object's declared symbol is an
ITableTypeSymbol, which is not anIRecordTypeSymbol; the record (Rec/this) is a separateIRecordTypeSymbolwrapper.ThisExpressionSyntaxdoes not exist in the netstandard2.1 SDK and must be guarded with#if !NETSTANDARD2_1.Scope (triage only)
For each analyzer that inspects method-call receivers at the syntax level (i.e. via
IdentifierNameSyntax/MemberAccessExpressionSyntax/InvocationExpressionSyntaxrather than the operation tree), determine whether all four forms are handled, and record findings. Candidate starting points (non-exhaustive, to be confirmed during the audit):ALCops.FormattingCop—CasingMismatchIdentifierALCops.LinterCop—ApiPageCanonicalFieldNameGuideALCops.PlatformCop—PartialRecordOperations,UseValidateForFieldAssignment,FlowFilterFieldAssignment,IsHandledParameterAssignment,TableRelationFieldLength,TransferFieldsSchemaCompatibilityThis issue is audit/triage only — do not prescribe or implement fixes here. Each confirmed gap should get its own follow-up issue.
Reference
analyzer-development.instructions.md→ "Record method receiver forms").