View Issue Details

IDProjectCategoryView StatusLast Update
0037896pas2jstranspilerpublic2020-10-28 21:13
ReporterHighball Assigned ToMattias Gaertner  
Status resolvedResolutionfixed 
Summary0037896: A/V on compilation for interface type helper with generic method
DescriptionSo I'm not 100% where this falls or if I have something wrong, but to try and circumvent the restriction of no generic methods in interfaces, I've tried to declare an interface type helper with a generic method. At first, this compiled just fine because the method had no arguments, but as soon as I added a method with an argument, the A/V occurs when attempting to compile.

Also to note, FPC does not seem to like my example at all (even the parameter-less method) since it produces the following errors:
Compile Project, Mode: standard, Target: project1.exe: Exit code 1, Errors: 4
project1.lpr(25,31) Error: Identifier not found "helper"
project1.lpr(25,38) Error: Error in type definition
project1.lpr(25,38) Error: Can't create unique type from this type
project1.lpr(25,38) Fatal: Syntax error, ";" expected but "FOR" found

the attached project has two build modes, browser & standard (windows). the browser target fails when uncommenting line 46 but builds with it commented out.
TagsNo tags attached.
Fixed in Revision47242 47243
Attached Files



2020-10-09 09:56


Mattias Gaertner

2020-10-28 20:16

manager   ~0126612

Delphi does not support interface helpers.

Issue History

Date Modified Username Field Change
2020-10-09 09:56 Highball New Issue
2020-10-09 09:56 Highball File Added:
2020-10-23 12:04 Mattias Gaertner Assigned To => Mattias Gaertner
2020-10-23 12:04 Mattias Gaertner Status new => assigned
2020-10-28 20:16 Mattias Gaertner Note Added: 0126612
2020-10-28 21:13 Mattias Gaertner Status assigned => resolved
2020-10-28 21:13 Mattias Gaertner Resolution open => fixed
2020-10-28 21:13 Mattias Gaertner Fixed in Revision => 47242 47243