View Issue Details

IDProjectCategoryView StatusLast Update
0031719FPCFCLpublic2017-05-12 17:09
ReporterAndrey ZubarevAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionProduct Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0031719: fcl-passrc error with chain methods call
Descriptionprogram Project1;
type
PTResourceManager=^TResourceManager;
TResourceManager=object
  function LoadResourceFromFile(filename:string):PTResourceManager;
end;
function TResourceManager.LoadResourceFromFile(filename:string):PTResourceManager;
begin
  //LoadFile(filename);
  result:=@self;
end;

var
  ResourceManager:TResourceManager;
begin
  ResourceManager.LoadResourceFromFile('file1')
                ^.LoadResourceFromFile('file2')
                ^.LoadResourceFromFile('file2')
                ^.LoadResourceFromFile('file3')
                ^.LoadResourceFromFile('file4')
                ^.LoadResourceFromFile('file5')
                ^.LoadResourceFromFile('file100500');
end.

Gives "Syntax error at token "Character" in file E:\zcad\other\pudgb\passrcerrors.pas at line 17 column 17"
TagsNo tags attached.
Fixed in Revision36190.
FPCOldBugId
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2017-04-26 23:21

administrator   ~0099958

Fixed. Thanks for reporting.

Andrey Zubarev

2017-04-27 05:50

reporter   ~0099960

Thanks!

Andrey Zubarev

2017-04-27 20:26

reporter   ~0099971

It doesn't always work.Depends on the delimiters in the line.
If place space before text line - it works, if not or place TAB - not works. See coments:

program ttest;
procedure test;
begin
ResourcePool.Shared^.Register(TypeOf(tTexture), @LoadTexture)^.Tag(GLResourceTag)
 ^.Register(TypeOf(tShader), @LoadShader)^.Tag(GLResourceTag)//space - works
^.Register(TypeOf(ShaderProgram), @LoadShaderProgram)^.Tag(GLResourceTag)//without space -not works
    ^.Register(TypeOf(tGLMesh), @LoadGLMesh)^.Tag(GLResourceTag)//tab -not works
^.Register(TypeOf(Postprocess), @LoadPostprocess)^.Tag(GLResourceTag);
end;
begin
end.

Michael Van Canneyt

2017-05-12 11:17

administrator   ~0100263

Fixed remaining cases (I hope). Thanks for testing!

Andrey Zubarev

2017-05-12 17:09

reporter   ~0100270

Thanks!

Issue History

Date Modified Username Field Change
2017-04-26 21:59 Andrey Zubarev New Issue
2017-04-26 22:06 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-04-26 22:06 Michael Van Canneyt Status new => assigned
2017-04-26 23:21 Michael Van Canneyt Fixed in Revision => 35960.
2017-04-26 23:21 Michael Van Canneyt Note Added: 0099958
2017-04-26 23:21 Michael Van Canneyt Status assigned => resolved
2017-04-26 23:21 Michael Van Canneyt Fixed in Version => 3.1.1
2017-04-26 23:21 Michael Van Canneyt Resolution open => fixed
2017-04-26 23:21 Michael Van Canneyt Target Version => 3.2.0
2017-04-27 05:50 Andrey Zubarev Note Added: 0099960
2017-04-27 05:50 Andrey Zubarev Status resolved => closed
2017-04-27 20:26 Andrey Zubarev Note Added: 0099971
2017-04-27 20:26 Andrey Zubarev Status closed => feedback
2017-04-27 20:26 Andrey Zubarev Resolution fixed => reopened
2017-05-12 11:17 Michael Van Canneyt Fixed in Revision 35960. => 36190.
2017-05-12 11:17 Michael Van Canneyt Note Added: 0100263
2017-05-12 11:17 Michael Van Canneyt Status feedback => resolved
2017-05-12 11:17 Michael Van Canneyt Resolution reopened => fixed
2017-05-12 17:09 Andrey Zubarev Note Added: 0100270
2017-05-12 17:09 Andrey Zubarev Status resolved => closed