View Issue Details

IDProjectCategoryView StatusLast Update
0036975FPCCompilerpublic2020-04-26 13:47
ReporterThaddy de Koning Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformarmhfOSRaspbian 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0036975: internal error2020011402 with constants in generics using IntegerArray as parameter
DescriptionI hate to spoil the party, but during tests for this nice new feature I encountered internal error 2020011402
testconstgen.pas(6,41) Fatal: Internal error 2020011402

The mode does not matter, either mode objfpc or mode Delphi

This error is in pgeenutil.pp, line 1433
Steps To ReproduceMode objfpc:
-----
{$mode objfpc}{$H+}
type
  generic TTest <T,const N:Tintegerarray> = class
  end;
    
begin
end.[/code]
-----

Mode Delphi:
-----
{$mode delphi}{$H+}
type
  TTest <T,const N:Tintegerarray> = class
  end;
    
begin
end.
----
Additional InformationI hope it is something trivial....
TagsNo tags attached.
Fixed in Revision45089
FPCOldBugId
FPCTarget-
Attached Files

Activities

Thaddy de Koning

2020-04-26 10:50

reporter   ~0122440

pgenutil.pp, sorry for the typo.

Sven Barth

2020-04-26 11:50

manager   ~0122442

While an internal error is not nice, I explicitely mentioned that only types that can be used for untyped constants can be used. An array can't be used for untyped constants.

Sven Barth

2020-04-26 13:47

manager   ~0122445

Now the compiler nicely complains about array types as well instead of raising an internal error.

Please test and close if okay.

Issue History

Date Modified Username Field Change
2020-04-26 10:48 Thaddy de Koning New Issue
2020-04-26 10:50 Thaddy de Koning Note Added: 0122440
2020-04-26 11:50 Sven Barth Note Added: 0122442
2020-04-26 13:47 Sven Barth Assigned To => Sven Barth
2020-04-26 13:47 Sven Barth Status new => resolved
2020-04-26 13:47 Sven Barth Resolution open => fixed
2020-04-26 13:47 Sven Barth Fixed in Version => 3.3.1
2020-04-26 13:47 Sven Barth Fixed in Revision => 45089
2020-04-26 13:47 Sven Barth FPCTarget => -
2020-04-26 13:47 Sven Barth Note Added: 0122445