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

Print(1) в старом методе расширения - Неверное количество параметров функции #3051

Open
miks1965 opened this issue Mar 11, 2024 · 2 comments

Comments

@miks1965
Copy link
Contributor

procedure integer.ПокажиМеня;
begin
  Print(1);
end; 

begin
  var i := 135;
  i.ПокажиМеня
end.

изображение

С какого то момента перестало работать

@miks1965
Copy link
Contributor Author

procedure ПокажиМеня(self: integer); extensionmethod;
begin
  Print(1);
end; 

begin
  var i := 135;
  i.ПокажиМеня
end.

Так работает

@miks1965
Copy link
Contributor Author

if (silExt.Count > 0 && expr_node == null) 
                        {
                            var en0 = convert_strong(new ident("Self",_method_call.dereferencing_value.source_context));
                            exprs.AddElementFirst(en0);
                            expr_node = convertion_data_and_alghoritms.create_full_function_call(exprs, sil, mcloc,
                                context.converted_type, context.top_function, proc_wait, _method_call.parameters?.expressions);
                        }

Этот код в s_t_v дает лишний Self в Print с модификатором var!!!

@miks1965 miks1965 changed the title Print(1) в методе расширения - Неверное количество параметров функции Print(1) в старом методе расширения - Неверное количество параметров функции Mar 13, 2024
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