Browse Source

pastojs: fixed check alias proc type

git-svn-id: trunk@37722 -
Mattias Gaertner 7 years ago
parent
commit
24c634d38d
1 changed files with 3 additions and 2 deletions
  1. 3 2
      packages/pastojs/src/fppas2js.pp

+ 3 - 2
packages/pastojs/src/fppas2js.pp

@@ -5899,9 +5899,10 @@ begin
         or (C=TPasFunctionType) then
       begin
       AContext.Resolver.ComputeElement(El.Value,ValueResolved,[rcNoImplicitProc]);
-      if ValueResolved.IdentEl is TPasProcedureType then
+      if (ValueResolved.IdentEl is TPasType)
+          and (AContext.Resolver.ResolveAliasType(TPasType(ValueResolved.IdentEl)) is TPasProcedureType) then
         begin
-         // type cast to proc type
+        // type cast to proc type
         Param:=El.Params[0];
         Result:=ConvertElement(Param,AContext);
         exit;