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

Неожиданное нельзя преобразовать к object #700

Closed
SunSerega opened this issue Mar 5, 2018 · 2 comments
Closed

Comments

@SunSerega
Copy link
Contributor

type
  I1<T> = interface end;
  
  T1<T> = class(I1<T1<T>>)//нужно использовать T1<T> как тип для шаблона, I1<I1<T1<T>>> тоже сработает
    
    procedure p1;
    begin
      var o:object := self;//Нельзя преобразовать тип T1<T> к object
    end;
    
  end;

begin end.
@miks1965
Copy link
Contributor

miks1965 commented Mar 5, 2018

Это ещё что. Вот это вообще вешает среду:

type
  I1<T> = interface end;
  
  T1<T> = class(I1<T1<T>>)
  end;

begin 
  var a := new T1<integer>;
end.

@ibond84
Copy link
Contributor

ibond84 commented Mar 7, 2018

разные ошибки лучше в разные issue

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

3 participants