Internal error 2015061207 when... probably when using a generic function in constant context.
Not the most pressing problem you've encountered because the code shouldn’t compile anyway and I didn’t spot it in the wild, but rather consciously abused the compiler...
{$mode objfpc}
generic function Size<T>: SizeUint;
begin
result := sizeof(T);
end;
var
a: array[0 .. specialize Size<double> - 1] of byte;
begin
end.
This code should not compile because it attempts to use a function result in constant context.
With non-generic function, it gives Illegal expression
or Can’t evaluate constant expression
, which is fair.
But using a generic function complements it with slightly annoying Internal error 2015061207
.