Sign in Join

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

Mailing lists / fpc-devel / 2009-06

local "class of" error?

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Martin Friebe

Not sure if this is intended, or just a wrong assumptions by the parser?

Procedure foo;
type
  TSomeClass = Class of TSome;
.....
gives the error:  Error: Local class definitions are not allowed

But there is no Class declaration. (Not sure what you call "class of") TSome is declared elsewhere already.
Hence my question:
Is this intended to give an error? (or does the parser just see class and makes the assumption a new class will be declared?)

Best Regards
Martin

Reply by email

Michael Van Canneyt
to Martin Friebe
Martin Friebe wrote 13 lines
Not sure if this is intended, or just a wrong assumptions by the parser? Procedure foo; type TSomeClass = Class of TSome; ..... gives the error: Error: Local class definitions are not allowed But there is no Class declaration. (Not sure what you call "class of") TSome is declared elsewhere already. Hence my question: Is this intended to give an error? (or does the parser just see class and makes the assumption a new class will be declared?)

I think this is a bug, you can file a bug report.

Michael.

Reply by email