Refrencing a type in a generic type lazarus / 21-General ---------------------------------------------------------------------- Okoba · 2025-01-29 09:27 How can I do this? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$mode delphi}type  TTest = record  type    TValue = Integer;  end;   TTest2 = record    V: T.TValue; //Error  end; ---------------------------------------------------------------------- ALLIGATOR · 2025-01-29 17:25 https://forum.lazarus.freepascal.org/index.php/topic,69638.msg542345.h tml#msg542345 ---------------------------------------------------------------------- Okoba · 2025-01-30 05:37 It seems working only for classes, and I want it for records. Can I have the issue you made? ---------------------------------------------------------------------- ALLIGATOR · 2025-01-30 07:40 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program test;{$mode delphi}type  TTest = record  type    TInnerClass = class    type kek = integer;    end;    TValue = TInnerClass.kek;  end;   TTest2 = record    V: T.kek;  end;begin end.  How about a workaround like this? (although I would prefer, of course, that everything works with Record's as well as with classes, without these unnecessary hacks that only confuse the code). ---------------------------------------------------------------------- ALLIGATOR · 2025-01-30 07:44 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program Project1;{$mode delphi}type  TBaseTypeClass = class    type kek = UInt32;  end;   TTest_32 = record  type    TInnerClass = class(TBaseTypeClass)      type kek = UInt32;    end;    TValue = TInnerClass.kek;  end;   TTest_64 = record  type    TInnerClass = class(TBaseTypeClass)      type kek = UInt64;    end;    TValue = TInnerClass.kek;  end;   TTest2 = record    V: T.kek;  end; var  rec32: TTest2;  rec64: TTest2; begin  WriteLn(SizeOf(rec32));  WriteLn(SizeOf(rec64));  ReadLn;end. ---------------------------------------------------------------------- Okoba · 2025-01-31 08:25 That is a cool hack! Thank you. Do you have the link to the issue so I can follow it and mention records? ---------------------------------------------------------------------- ALLIGATOR · 2025-02-01 15:11 Quote from: Okoba on January 31, 2025, 09:25:57 amDo you have the link to the issue so I can follow it and mention records? I didn't create an issue and I don't know if one already exists