View Issue Details

IDProjectCategoryView StatusLast Update
0037132FPCCompilerpublic2020-05-23 20:26
ReporterMartin Friebe Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platform64bit IntelOSwin 10 
Product Version3.3.1 
Summary0037132: Wrong error message with "type foo = type bar;"
DescriptionIf you declare a distinct type, with
  Wrong error message with "type foo = type bar;"
And then try to pass an incompatible type the error will refer to "bar", but it should refer to "foo";

See code in "steps to reproduce"
Compiler gives the following error:
  project1.lpr(16,8) Error: Incompatible type for arg no. 1: Got "TPoint", expected "PROJECT1.TPoint"

But it should say: "... expected Project1.TMyPoint"
Steps To Reproduceprogram Project1;
{$mode objfpc}{$H+}
uses types;

type
  TMyPoint = type TPoint;

procedure Foo(mp: TMyPoint);
begin
end;

var
  p: TPoint;

begin
  Foo(p);
end.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-05-23 20:26 Martin Friebe New Issue