<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 27.10.2014 16:23, schrieb Sven
Barth:<br>
</div>
<blockquote
cite="mid:CAFMUeB8aX02r_9VBvxJKME413C-VHRbueVCS=rA_81jOmDz8uw@mail.gmail.com"
type="cite">
<p>Am 27.10.2014 14:54 schrieb "<a moz-do-not-send="true"
href="mailto:hinstance@yandex.ru">hinstance@yandex.ru</a>"
<<a moz-do-not-send="true" href="mailto:hinstance@yandex.ru">hinstance@yandex.ru</a>>:<br>
><br>
> I tested it a bit; thoughts so far:<br>
> 1. generic and refcounted do not work well together: no
matter how I arrange it, a class can't be both generic and
refcounted, it causes the compiler to produce some internal
error 2014092205.</p>
<p>Oh, good to know. I'll take a look at that when I find the time
:) (and that internal error is one I added for that feature, so
that's a "good" sign as well ;) )</p>
</blockquote>
Do you have an example? I tried this and it works:<br>
<br>
=== code begin ===<br>
<br>
program trefcounted;<br>
<br>
{$mode objfpc}<br>
<br>
type<br>
generic TTest<T> = class refcounted<br>
end;<br>
<br>
TTestLongInt = specialize TTest<LongInt>;<br>
<br>
var<br>
t: TTestLongInt;<br>
begin<br>
t := TTestLongInt.Create;<br>
end.<br>
<br>
=== code end ===<br>
<br>
Regards,<br>
Sven<br>
</body>
</html>