Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-10

AbstractError in 3.1.1

9 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Joseph

I just built the ppcx64 trunk version 3.1.1 so I could try the memory management operator overloads we talked about but I’m getting a compiler error in my project that doesn’t make sense.

On the last line of one unit (literally at end.) I get: error: identifier idents no member “AbstractError”. What does this mean? There is just the last line of the unit so presumably it occurred higher up but I don’t have any other information to go on.

Regards,
Ryan Joseph

Reply by email

Sven Barth
to Ryan Joseph
"Ryan Joseph" wrote
I just built the ppcx64 trunk version 3.1.1 so I could try the memory

management operator overloads we talked about but I’m getting a compiler error in my project that doesn’t make sense.

On the last line of one unit (literally at end.) I get: error: identifier

idents no member “AbstractError”. What does this mean? There is just the last line of the unit so presumably it occurred higher up but I don’t have any other information to go on.

AbstractError() is the name of the function the compiler uses to replace abstract methods with (so that they generate an exception when called). Thus something very strange is going on with your installation :/

Regards,
Sven

Reply by email

Ryan Joseph
to Sven Barth
On Oct 12, 2017, at 12:59 PM, Sven Barth via fpc-pascal wrote: AbstractError() is the name of the function the compiler uses to replace abstract methods with (so that they generate an exception when called). Thus something very strange is going on with your installation :/

Is there anything I can do to track it down? It has been there for 6 months now preventing me from upgrading (I was using 3.1.1 until I got this bad version and went back to 3.0.2). If I start removing parts of the program piece by piece I may be able to figure it out but that’s obviously a last resort and I’ve avoided it for 6 months now. ;)

Regards,
Ryan Joseph

Reply by email

Sven Barth
to Ryan Joseph
"Ryan Joseph" wrote 7 lines
> On Oct 12, 2017, at 12:59 PM, Sven Barth via fpc-pascal < wrote: > > AbstractError() is the name of the function the compiler uses to

replace abstract methods with (so that they generate an exception when called). Thus something very strange is going on with your installation :/

Is there anything I can do to track it down? It has been there for 6

months now preventing me from upgrading (I was using 3.1.1 until I got this bad version and went back to 3.0.2). If I start removing parts of the program piece by piece I may be able to figure it out but that’s obviously a last resort and I’ve avoided it for 6 months now. ;)

Could you try whether a test program with an abstract method that you call compiles correctly?

Regards,
Sven

Reply by email

Ryan Joseph
to Sven Barth
Show quoted text 5 lines
On Oct 12, 2017, at 4:19 PM, Sven Barth via fpc-pascal wrote: Could you try whether a test program with an abstract method that you call compiles correctly?

Thanks that was the tip I needed. That unit had an abstract method and after removing it the problem went away. Are abstract methods broken or something?

Regards,
Ryan Joseph

Reply by email

Michael Van Canneyt
to Ryan Joseph
Ryan Joseph wrote 12 lines
> On Oct 12, 2017, at 4:19 PM, Sven Barth via fpc-pascal wrote: > > Could you try whether a test program with an abstract method that you call compiles correctly? > > Thanks that was the tip I needed. That unit had an abstract method and after removing it the problem went away. Are abstract methods broken or something?

Normally not :)

What Sven wanted to ascertain was why you get this error, which is totally abnormal.

Michael.

Reply by email

Ryan Joseph
to Michael Van Canneyt
Show quoted text 5 lines
On Oct 12, 2017, at 5:35 PM, Michael Van Canneyt wrote: Normally not :) What Sven wanted to ascertain was why you get this error, which is totally abnormal.

Ok did some tests and here’s an example of how to reproduce it. It’s the name “system” which is doing it and if I remove that name the error goes away.

type
	TAbstractClass = class
		function GetLocation (system: TObject): TPoint; virtual; abstract;
	end;

Regards,
Ryan Joseph

Reply by email

Sven Barth
"Ryan Joseph" wrote
> On Oct 12, 2017, at 5:35 PM, Michael Van Canneyt
> > Normally not :) > > What Sven wanted to ascertain was why you get this error, which is

totally abnormal.

Ok did some tests and here’s an example of how to reproduce it. It’s the

name “system” which is doing it and if I remove that name the error goes away.

type TAbstractClass = class function GetLocation (system: TObject): TPoint; virtual;
abstract;
end;

Wow, okay, that's a nasty one O.o Considering that the "AbstractError" is in the System unit it's safe to assume that the compiler is getting confused there.
Would you please open a bug report with this as a full example?

But I'm glad that you found the issue...

Regards,
Sven

Reply by email

Ryan Joseph
to Sven Barth

Reported at https://bugs.freepascal.org/view.php?id=32538. I didn’t say much but I think that should be enough.

Thanks.

Show quoted text 7 lines
On Oct 12, 2017, at 7:22 PM, Sven Barth via fpc-pascal wrote: Wow, okay, that's a nasty one O.o Considering that the "AbstractError" is in the System unit it's safe to assume that the compiler is getting confused there. Would you please open a bug report with this as a full example? But I'm glad that you found the issue...

Regards,
Ryan Joseph

Reply by email