Skip to content

Fail case for commit cd5664c2 #293

@ccy

Description

@ccy

The commit cd5664c fail to work on the following case.

The test case is available here: https://github.com/ccy/pascalscript/tree/Bug%23cd5664c2

procedure TPascalScriptTests.Test_cd5664c2;
begin
  CheckEquals(
    10
  , Execute<Integer>('''
    function Execute: Integer;
    var B: TStringList;
    begin
      B := TStringList.Create;
      try
        while B.Count < 10 do
          B.Add('B');
        Result := B.Count;
      finally
        B.Free;
      end;
    end;
  ''')
  );
end;

For Win32: Fails with EPSException: Could not call proc.
For Win64: Fails with Exception: Type Mismatch.

Test case pass if revert commit cd5664c.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions