I do use that object...
I do use that object...
procedure TClassInstanceDictionary.SendNotifyTelegram(const id: Integer; const tlg: TPSDTelegramBase);
var
Obj : TBaseClass;
begin
Obj := Items[Id] as TBaseClass; // <-- Hint
Obj.SendNotifyTelegram(tlg);
end;
[dcc32 Hint] SomeUnit.pas(xxx): H2077 Value assigned to 'Obj' never used
procedure TClassInstanceDictionary.SendNotifyTelegram(const id: Integer; const tlg: TPSDTelegramBase);
var
Obj : TBaseClass;
begin
Obj := Items[Id] as TBaseClass; // <-- Hint
Obj.SendNotifyTelegram(tlg);
end;
[dcc32 Hint] SomeUnit.pas(xxx): H2077 Value assigned to 'Obj' never used
Nobody uses telegrams anymore, that so 1800's ;-)
ReplyDeleteWhen you have multiple concurrent client apps that massage the same data sets. and a server that mess with the massaged data - telegrams are a necessary evil - unless you want to go MQ or something - and - you don't.
ReplyDeleteOr just get rid of the dead variable:
ReplyDelete(Items[id] as TBaseClass).SendNotifyTelegram (tlg);
Willo van der Merwe - That's a bit trickey in XE4.
ReplyDeleteprocedure TClassInstanceDictionary.SendNotifyTelegram(const id: Integer; const tlg: TPSDTelegramBase);
begin
(Items[Id] as TBaseClass).SendNotifyTelegram(tlg);
en|d;
^[dcc32 Fatal Error] SomeUnit.pas(xxx): F2084 Internal Error: C1769
Same for
ReplyDeleteTBaseClass(Items[Id]).SendNotifyTelegram(tlg);
Oh dear. I thought the compiler might choke, but not like that!
ReplyDeleteHard cast it?
Lars Fosdal sounds to me like you uncovered a compiler bug.
ReplyDeleteCan you recreate it in a new project, with a similar sample class?
I'll try - but there are several other massive generics classes in the unit, so it might not be possible to make a "mini version" of it.
ReplyDeletenot impressed with xe4, not impressed at all... hoping that xe5 will worth it...
ReplyDeleteThere are a few nice small changes for the better - but yeah - it is still plagued with a lot of the old troubles with regards to the IDE, and not to forget - useless internal errors in the Generics compiler.
ReplyDelete„There are a few nice small changes for the better¯
ReplyDeleteyou should get at least "something" for the upgrade... but based on your posts(thank you a lot for them), it seems that there's quite a bit of hassle to upgrade, many things need to be tested and fiddle with in order to keep my projects working...
No more hassles than expected, I'd say. It's on par with the previous updates.
ReplyDelete... not that it in any way should be seen as a measure of success. They really need to improve the IDE.
ReplyDeleteoh yea, the friggin' IDE!!
ReplyDeleteDorin Duminica The compiler went straight downhill regarding generics from XE3 on ... I just completly ticked out yesterday when I read the resolution comment on QC#116151...
ReplyDeleteStefan Glienke Ouch...
ReplyDelete