mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 21:29:42 +02:00
fcl-passrc: fixed isspecialized test
git-svn-id: trunk@44387 -
This commit is contained in:
parent
ef13f52ba8
commit
2ae212164e
@ -2324,6 +2324,7 @@ type
|
||||
Params: TFPList): TPasElement; virtual;
|
||||
procedure FinishSpecializedClassOrRecIntf(Scope: TPasGenericScope); virtual;
|
||||
procedure FinishSpecializations(Scope: TPasGenericScope); virtual;
|
||||
function IsSpecialized(El: TPasGenericType): boolean; overload;
|
||||
function IsFullySpecialized(El: TPasGenericType): boolean; overload;
|
||||
function IsFullySpecialized(Proc: TPasProcedure): boolean; overload;
|
||||
function IsInterfaceType(const ResolvedEl: TPasResolverResult;
|
||||
@ -27943,7 +27944,7 @@ var
|
||||
ProcScope: TPasProcedureScope;
|
||||
begin
|
||||
Result:=nil;
|
||||
if El.CustomData<>nil then
|
||||
if (El.ClassType=TPasSpecializeType) and (El.CustomData<>nil) then
|
||||
RaiseNotYetImplemented(20190726142522,El);
|
||||
|
||||
// check if there is already such a specialization
|
||||
@ -28099,6 +28100,12 @@ begin
|
||||
SpecializeGenericImpl(TPRSpecializedItem(SpecializedItems[i]));
|
||||
end;
|
||||
|
||||
function TPasResolver.IsSpecialized(El: TPasGenericType): boolean;
|
||||
begin
|
||||
Result:=(El<>nil) and (El.CustomData is TPasGenericScope)
|
||||
and (TPasGenericScope(El.CustomData).SpecializedFromItem<>nil);
|
||||
end;
|
||||
|
||||
function TPasResolver.IsFullySpecialized(El: TPasGenericType): boolean;
|
||||
var
|
||||
GenScope: TPasGenericScope;
|
||||
|
@ -2981,7 +2981,7 @@ function TPasElement.GetModule: TPasModule;
|
||||
Var
|
||||
p : TPaselement;
|
||||
begin
|
||||
if self is TPasPackage then
|
||||
if Self is TPasPackage then
|
||||
Result := nil
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user