View Issue Details

IDProjectCategoryView StatusLast Update
0038305pas2jstranspilerpublic2021-01-10 23:16
Reporterhenrique Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformPas2JsOSWindows 
Summary0038305: Error compiling generics
DescriptionWhen I try to create a dictionary that has the value being a procedure gives the build error "Error: procedural type expected, but functional type found".

I've attach a project with the error.
TagsNo tags attached.
Fixed in Revision
Attached Files

Activities

henrique

2021-01-04 13:46

reporter  

Error.zip (515 bytes)

Mattias Gaertner

2021-01-10 23:11

manager   ~0128255

Error is on
  SomeProcVar:=SomeFuncReturningAProcVar;

Without generics this is forbidden in Delphi. You must add the ().
But with generics Delphi allows it.
So, either Delphi has a bug not checking the actual type of the template, or I'm clueless what the rule is.

Mattias Gaertner

2021-01-10 23:16

manager   ~0128256

I fixed the TDictionary code.
IMO it is better to keep pas2js consistent here.

Issue History

Date Modified Username Field Change
2021-01-04 13:46 henrique New Issue
2021-01-04 13:46 henrique File Added: Error.zip
2021-01-05 12:50 Mattias Gaertner Assigned To => Mattias Gaertner
2021-01-05 12:50 Mattias Gaertner Status new => assigned
2021-01-10 23:11 Mattias Gaertner Note Added: 0128255
2021-01-10 23:16 Mattias Gaertner Status assigned => resolved
2021-01-10 23:16 Mattias Gaertner Resolution open => fixed
2021-01-10 23:16 Mattias Gaertner Note Added: 0128256