Recent

Author Topic: making types totally incompatible  (Read 2275 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 16939
  • Ceterum censeo Trump esse delendam
Re: making types totally incompatible
« Reply #30 on: April 19, 2025, 03:13:24 pm »
How about:
Code: Pascal  [Select][+][-]
  1. {$mode objfpc}
  2. type
  3.   generic TMyGenericRecord<T> = record
  4.     value:T;
  5.   end;
  6. begin
  7. end.
Initial tests show assignment is only to specialized T, nothing else.
Will finish it later.
« Last Edit: April 19, 2025, 03:19:33 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

 

TinyPortal © 2005-2018