diff options
author | mattias <mattias@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-12-29 00:26:00 +0000 |
---|---|---|
committer | mattias <mattias@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-12-29 00:26:00 +0000 |
commit | 1f1592c2441b8e76045644a23de1572175c26b46 (patch) | |
tree | 6cdbf8dcdd1fedab4669ee2fdd139f40e2bbb018 /packages/fcl-passrc/src/pasresolver.pp | |
parent | 851e9569ebe518bec2b50f4d79fb662ab0636eb2 (diff) | |
download | fpc-1f1592c2441b8e76045644a23de1572175c26b46.tar.gz |
fcl-passrc: fixed parsing a(b).c<d>()
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47879 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-passrc/src/pasresolver.pp')
-rw-r--r-- | packages/fcl-passrc/src/pasresolver.pp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/packages/fcl-passrc/src/pasresolver.pp b/packages/fcl-passrc/src/pasresolver.pp index fef050ce41..09b3cefd90 100644 --- a/packages/fcl-passrc/src/pasresolver.pp +++ b/packages/fcl-passrc/src/pasresolver.pp @@ -4734,7 +4734,7 @@ end; procedure TPasResolver.GetParamsOfNameExpr(El: TPasExpr; out ParentParams: TPRParentParams); -// Checks is El is the name expression of a call or array access +// Checks if El is the name expression of a call or array access // For example: a.b.El() a.El[] // Note: TPasParser guarantees that there is at most one TBinaryExpr // and one TInlineSpecializeExpr between El and TParamsExpr @@ -10207,9 +10207,19 @@ begin begin TemplTypes:=GetProcTemplateTypes(Proc); if (TemplTypes<>nil) then + begin // implicit function specialization without bracket + {$IFDEF VerbosePasResolver} + DeclEl:=El; + while DeclEl.Parent is TPasExpr do + DeclEl:=DeclEl.Parent; + {AllowWriteln} + writeln('TPasResolver.ResolveNameExpr ',WritePasElTree(TPasExpr(DeclEl),' ')); + {AllowWriteln-} + {$ENDIF} RaiseMsg(20191007222004,nCouldNotInferTypeArgXForMethodY, sCouldNotInferTypeArgXForMethodY,[TPasGenericTemplateType(TemplTypes[0]).Name,Proc.Name],El); + end; end; if El.Parent.ClassType=TPasProperty then |