Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign anonymous record to variant #6

Open
soinalastudio opened this issue Sep 14, 2020 · 0 comments
Open

Assign anonymous record to variant #6

soinalastudio opened this issue Sep 14, 2020 · 0 comments

Comments

@soinalastudio
Copy link

soinalastudio commented Sep 14, 2020

Hello,
Why are "Anonymous record" not compatible with "Variant"? I tried to use CodeGen from dws program bellow:

program Test;

type TFunc = function(y: integer): integer;

procedure DoSomething(func: TFunc);
begin
end;

begin
 var t, y: variant;
 t := record
   name = 8;
   height = 10;
   size: record
     name = 'tool';
   end;
 end;
 
 DoSomething(lambda(y) => y+1);
 
 y.name := 7;
 
 t := y;
 
end.

The output is: there are former version of DWS that allow it.
Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant