View Issue Details

IDProjectCategoryView StatusLast Update
0028824FPCCompilerpublic2019-06-08 12:56
ReporterDenis GolovanAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version3.1.1Product Build 
Target VersionFixed in Version 
Summary0028824: Compiler does not respect type aliases when overloading
DescriptionHi

Type aliases look like are messed up when overloading functions.
I assume type aliases should be respected in "inline" type declarations.

See attached project.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

Denis Golovan

2015-10-11 15:11

reporter  

project1.lpr (1,409 bytes)

Misha Strong

2015-10-11 16:04

reporter   ~0086448

Maybe using VAR parameters makes it a stricter match.

I apoligize if I'm confused.

Misha Strong

2015-10-11 16:42

reporter   ~0086451

I got it!

Put each Integer inside a record.

TInt=record
int:Integer;
end;
var
x:array of TInt;

Denis Golovan

2015-10-11 17:11

reporter   ~0086456

Not relevant.
See original name for this bugreport - "... type aliases ..."

Misha Strong

2015-10-11 17:42

reporter   ~0086459

I do know, that Delphi arrays are separate, while FPC arrays are shared.

In other words:
Type TArray=array of Integer;
TArray2=array of Integer;// These are two different things under Delphi.

But they are the same under FPC. Perhaps this is your problem?

Denis Golovan

2015-10-11 17:50

reporter   ~0086460

> I do know, that Delphi arrays are separate, while FPC arrays are shared.
That's not true. They are not the same.

Denis Golovan

2019-06-08 12:56

reporter   ~0116623

Still present in rev.42189

Issue History

Date Modified Username Field Change
2015-10-11 15:11 Denis Golovan New Issue
2015-10-11 15:11 Denis Golovan File Added: project1.lpr
2015-10-11 16:04 Misha Strong Note Added: 0086448
2015-10-11 16:42 Misha Strong Note Added: 0086451
2015-10-11 17:11 Denis Golovan Note Added: 0086456
2015-10-11 17:42 Misha Strong Note Added: 0086459
2015-10-11 17:50 Denis Golovan Note Added: 0086460
2019-06-08 12:56 Denis Golovan Note Added: 0116623