View Issue Details

IDProjectCategoryView StatusLast Update
0038855pas2jstranspilerpublic2021-05-04 19:03
ReporterWagner Landgraf Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Summary0038855: Generic constraint "constructor" cannot be used with a type constraint.
DescriptionThe following project doesn't compile, generating the compiler error:
[Error] Project5.dpr(9): "TFoo" constraint and "constructor" constraint cannot be specified together
It should be possible to specify both constraints in a generic type.


program Project5;

{$APPTYPE CONSOLE}

type
  TFoo = class
  end;

  TStaticFactory<T: TFoo, constructor> = class
  end;

begin
end.
TagsNo tags attached.
Fixed in Revision
Attached Files

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-05-04 17:30 Wagner Landgraf New Issue
2021-05-04 19:03 Mattias Gaertner Assigned To => Mattias Gaertner
2021-05-04 19:03 Mattias Gaertner Status new => assigned