Add support for anonymous functions in parameters

Issue #119 new
Former user created an issue

When adding an anom func such as TProc<string> in a parameter method, when calling the method with the anom proc the souce code understand as a error. For example, Go to symbol does not work in the unit anymore.

Comments (2)

  1. Rodrigo Caetano

    Not able to reproduce in a separated project, only in my production code. I’ll try to reproduce and attach here

  2. Rodrigo Caetano

    Reproduced. The anom func must have local variables defined:

    unit test2;
    
    interface
    
    uses
      System.Classes, System.SysUtils;
    
    type
      TTest2 = class
      public
        procedure Method1(AProc: TProc<string>);
        procedure Method2;
      end;
    
    implementation
    
    procedure TTest2.Method1(AProc: TProc<string>);
    begin
    
    end;
    
    procedure TTest2.Method2;
    begin
      Method1(
        procedure(AParam: string)
        var
          Variable: string; //only when have a varible defined
        begin
    
        end
      )
    end;
    
    
    end.
    

  3. Log in to comment