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

Не видит содержимое текущего класса из лямбды в read индексного свойства #3065

Open
SunSerega opened this issue Mar 25, 2024 · 1 comment

Comments

@SunSerega
Copy link
Contributor

type
  t1 = class
    
    function f0<T>(f: ()->T) := f();
    
    function f1 := new Dictionary<byte, word>;
    
    //Ошибка: Неизвестное имя 'f1'
    property p[b: byte]: word read f0(()->f1.Get(b));
    
  end;
  
begin end.

Если вызывать f1 как self.f1 - всё работает.

@SunSerega
Copy link
Contributor Author

С полем вместо метода тоже воспроизводится:

type
  t1 = class
    
    f1 := new Dictionary<byte, word>;
    
    function f0<T>(f: ()->T) := f();
    
    //Ошибка: Неизвестное имя 'f1'
    property p[b: byte]: word read f0(()->f1.Get(b));
    
  end;
  
begin end.

@SunSerega SunSerega changed the title Не видит метод текущего класса из лямбды в read индексного свойства Не видит содержимое текущего класса из лямбды в read индексного свойства Apr 3, 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