fpc/tests/test/ugeneric75.pp
svenbarth c572395f61 * pgenutil.pas, generate_specialization & psub.pas, specialize_objectdefs:
When specializing a generic the references from unitsyms to the loaded modules
	needs to be reestablished, so that "unitidentifier.identifier" can be used
	inside a generic without leading to an access violation.
	Only global units are checked, because a generic must not use symbols from the
	static symtable or from units used by the implementation section (the latter is 
	currently not checked)

+ added tests for the above problem for "normal" units as well as units with a namespace 

git-svn-id: trunk@20245 -
2012-02-04 11:33:17 +00:00

23 lines
215 B
ObjectPascal

unit ugeneric75;
{$mode objfpc}
interface
uses
ugeneric.test75;
type
generic TGeneric<T> = class
procedure Test;
end;
implementation
procedure TGeneric.Test;
begin
ugeneric.test75.Test;
end;
end.