View Issue Details

IDProjectCategoryView StatusLast Update
0037758FPCPackagespublic2020-09-16 21:17
ReporterJoe care Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86-64OSWin64 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0037758: Array-Parmeter have wrong brackets '(' insted of '['
Descriptionfunction TParamsExpr.GetDeclaration(full: Boolean): string;
Writes Arrayvar(someExpression) but it should give Arrayvar[SomeExpresion]
Steps To ReproduceParse :
const c:array[0..1] of byte = (1,2); begin write(c[0]); end.
PasWrite produces:
program test;

const
  c : Array[0..1] of Byte = (1, 2);

begin
  write(c(0));
end.
Additional InformationProvided patch ...
Tagspass-rc
Fixed in Revision46878
FPCOldBugId
FPCTarget3.2.2
Attached Files

Activities

Joe care

2020-09-16 20:43

reporter  

pastree.patch (412 bytes)   
Index: pastree.pp
===================================================================
--- pastree.pp	(Revision 46877)
+++ pastree.pp	(Arbeitskopie)
@@ -5724,7 +5724,7 @@
       Result:=Result+', ';
     Result:=Result+Params[I].GetDeclaration(Full);  
     end;
-  if Kind = pekSet then
+  if Kind in [pekSet,pekArrayParams] then
     Result := '[' + Result + ']'
   else
     Result := '(' + Result + ')';
pastree.patch (412 bytes)   

Joe care

2020-09-16 20:46

reporter   ~0125576

It's about Pass-Rc (sorry, forgot to mention it)

Michael Van Canneyt

2020-09-16 21:17

administrator   ~0125579

Checked and applied, thank you very much !

Issue History

Date Modified Username Field Change
2020-09-16 20:43 Joe care New Issue
2020-09-16 20:43 Joe care File Added: pastree.patch
2020-09-16 20:44 Joe care Tag Attached: pass-rc
2020-09-16 20:46 Joe care Note Added: 0125576
2020-09-16 21:17 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-09-16 21:17 Michael Van Canneyt Status new => resolved
2020-09-16 21:17 Michael Van Canneyt Resolution open => fixed
2020-09-16 21:17 Michael Van Canneyt Fixed in Version => 3.3.1
2020-09-16 21:17 Michael Van Canneyt Fixed in Revision => 46878
2020-09-16 21:17 Michael Van Canneyt FPCTarget => 3.2.2
2020-09-16 21:17 Michael Van Canneyt Note Added: 0125579