【TFoo = class(TBar>)】NEEDED lazarus / 64-FPC development ---------------------------------------------------------------------- ExSystem · 2016-03-09 07:48 http://bugs.freepascal.org/view.php?id=24283 would this get to be fixed? or, let me do it? ---------------------------------------------------------------------- balazsszekely · 2016-03-09 09:50 According to the bug report it's not fixed(not even assigned to a developer),  so feel free to create a patch . The beer is on me if you can do it. ---------------------------------------------------------------------- ExSystem · 2016-04-11 02:48 btw, is there any workaround for this? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i IFoo = Interface(IInterface) //YES, interface, NOT class  Procedure Bar(AFoo: ISomeList>); //SEE ISomeList>End; ---------------------------------------------------------------------- Leledumbo · 2016-04-11 05:35 Quote from: ExSystem on April 11, 2016, 04:48:50 ambtw, is there any workaround for this? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i IFoo = Interface(IInterface) //YES, interface, NOT class  Procedure Bar(AFoo: ISomeList>); //SEE ISomeList>End; What workaround? Please describe the problem along with full short compilable code. This: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$mode delphi} type  TSomeClass = class  end;   ISomeList = interface  end;   IFoo = Interface(IInterface) //YES, interface, NOT class    Procedure Bar(AFoo: ISomeList>); //SEE ISomeList>  End; beginend. Compiles. ---------------------------------------------------------------------- ExSystem · 2016-04-11 06:22 This does compile in DELPHI, but NOT in FPC(mine is ver 3.0.0). <-- This is the exactly problem. Quote from: Leledumbo on April 11, 2016, 07:35:35 amQuote from: ExSystem on April 11, 2016, 04:48:50 ambtw, is there any workaround for this? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i IFoo = Interface(IInterface) //YES, interface, NOT class  Procedure Bar(AFoo: ISomeList>); //SEE ISomeList>End; What workaround? Please describe the problem along with full short compilable code. This: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$mode delphi} type  TSomeClass = class  end;   ISomeList = interface  end;   IFoo = Interface(IInterface) //YES, interface, NOT class    Procedure Bar(AFoo: ISomeList>); //SEE ISomeList>  End; beginend. Compiles. ---------------------------------------------------------------------- Cyrax · 2016-04-11 08:38 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$mode objfpc}{$H+} Type   generic IFoo = Interface(IInterface)...  In objfpc mode, you need to add generic keyword in before your type. ---------------------------------------------------------------------- marcov · 2016-04-11 08:59 It compiles with 3.1.1 but not with 3.0.0: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i C:\testing>fpc gtstFree Pascal Compiler version 3.1.1 [2016/03/23] for i386Copyright (c) 1993-2016 by Florian Klaempfl and othersTarget OS: Win32 for i386Compiling gtst.ppgtst.pp(4,14) Note: Private type "TSomeClass$1.T" never usedgtst.pp(7,13) Note: Private type "ISomeList$1.T" never usedLinking gtst.exe14 lines compiled, 0.1 sec, 26928 bytes code, 1300 bytes data2 note(s) issued C:\testing>dorel C:\testing>fpc gtstFree Pascal Compiler version 3.0.0 [2015/11/16] for i386Copyright (c) 1993-2015 by Florian Klaempfl and othersTarget OS: Win32 for i386Compiling gtst.ppgtst.pp(11,45) Fatal: Syntax error, "," expected but "<" foundFatal: Compilation abortedError: C:\fpc\3.0.0\bin\i386-win32\ppc386.exe returned an error exitcode  Cyrax:  he has a $mode delphi in place. The objfpc code is Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$mode objfpc} type generic  TSomeClass = class  end;  generic  ISomeList = interface  end;   generic IFoo = Interface(IInterface) //YES, interface, NOT class    Procedure Bar(AFoo: specialize ISomeList>); //SEE ISomeList>  End; beginend. And I know I know why I hate the FPC syntax again, but also in this case only 3.1.1 works, 3.0.0 not: Code: [Select] C:\testing>fpc gtst Free Pascal Compiler version 3.0.0 [2015/11/16] for i386 Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling gtst.pp gtst.pp(11,46) Error: Identifier not found "specialize" gtst.pp(11,57) Error: Type identifier expected gtst.pp(11,57) Fatal: Syntax error, "," expected but "identifier TSOMECLASS" found Fatal: Compilation aborted Error: C:\fpc\3.0.0\bin\i386-win32\ppc386.exe returned an error exitcode ---------------------------------------------------------------------- ExSystem · 2016-04-11 13:19 great, I start deleting a bunch of {$IFDEF FPC} .. {$ELSE} .. {$ENDIF} blocks now. No more IPairXXX, but just IXXX> now... And i think, in objfpc mode, just copy the forms of C++, JAVA, C# in generics grammar is fine... ---------------------------------------------------------------------- ExSystem · 2016-04-16 14:36 AFTER UPGRADING FPC TO 3.1.1: A new bug found related to GENERICS.  Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Unit XFramework.Acl; {$IFDEF FPC}{$mode delphi}{$H+}{$ENDIF} Interface Uses  XFramework.System, XFramework.Containers, // XFramework  SysUtils; Type  // forward declaration - begin  TAcl = Class;  // forward declaration - end   // fake todo -begin  TClass = Class  End;  // fake todo -end   EAclException = Class(EException);  EResourceExisted = Class(EAclException);  ENoSuchParentResource = Class(EAclException);  ERoleExisted = Class(EAclException);  EMembershipExisted = Class(EAclException);  ENoSuchMembership = Class(EAclException);  ENoSuchParentRole = Class(EAclException);  ENoSuchRole = Class(EAclException);  ENoSuchResource = Class(EAclException);   IRole = Interface(IInterface)    Function GetRoldId: String;    Property RoldId: String Read GetRoldId;  End;   IResource = Interface(IInterface)    Function GetResourceId: String;    Property ResourceId: String Read GetResourceId;  End;   TAssertion = Function(Acl: TAcl; Rold: IRole; Resource: IResource; Privilege: String): Boolean Of Object;  LAST LINE, char 45(  TAssertion = Function(Acl: TAcl = Function(Acl: TAcl