Skip to content

Rule 0052 does not detect internal procedures being referenced with property syntax #311

@Arthurvdv

Description

@Arthurvdv

Today I learned you can invoke global procedures with property-syntax, e.g.:

codeunit 70257126 MyCodeunitWithProperty
{
    var
        MyIntegerVariable: Integer;

    internal procedure MyInteger(NewIntegerValue: Integer)
    begin
        MyIntegerVariable := NewIntegerValue;
    end;
}

codeunit 70257127 SampleCodeunit
{
    var
        MyCodeunitWithProperty: Codeunit MyCodeunitWithProperty;

    trigger OnRun()
    begin
        MyCodeunitWithProperty.MyInteger := 42;
    end;
}

For this sample, rule 0052 does not detect that the internal procedure is referenced.


Original Comments from StefanMaron/BusinessCentral.LinterCop#518

Comment by @pri-kise on 2024-01-23T14:34:00Z

I think this is feature is limited to simple types like, Text, Integer, BigInteger and the procedure must only have one paramter.


Copied from original issue: StefanMaron/BusinessCentral.LinterCop#518

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions