Hi Team,
Please find below code, While declaring interface getting error(Type mismatch, cannot assign “T” to “T”).
NonWorkingInterface<T> = interface
function GetSubject: T;
property Subject: T read GetSubject; // Error (E62) Type mismatch, cannot assign "T" to "T"
end;
WorkingInterface<T> = interface
function GetSubject: T;
property Subject: T read;
end;
Thanks
mh
(marc hoffman)
February 16, 2021, 12:31pm
2
What platform is this? I tried own .NET and this compiled fine:
Hi Team,
I tried this on .Net with version of Oxygene is (RemObjects Elements with Water - 10.0.0.2559)
Thanks!
ck
(Carlo Kok)
February 17, 2021, 3:14pm
4
Do you have a more complete example we can try? My colleague tried to reproduce this problem but couldn’t with the code given, so it might be a slight difference in what you are trying, or enclosing code.
Hi Team,
I tried the code in new version of Oxygene (RemObjects Elements with Water - 10.0.0.2595) and it’s working as expected.
Thanks!
1 Like
mh
(marc hoffman)
February 17, 2021, 3:57pm
6
Ah, ok. 2559 is pretty old, so it could be this was fixed, or affected by some other related fix. thanx!