Re: [fpc-devel] global property, with getter in other unit

2012-02-29 Thread Hans-Peter Diettrich
Paul Ishenin schrieb: You found some bug in the compiler. Property can only be declared inside a structure but compiler allowed to do this in a unit level. AFAIK unit-properties are an intentional FPC extension over Delphi. I already used it for debugging purposes, replacing global variables

Re: [fpc-devel] global property, with getter in other unit

2012-02-28 Thread Paul Ishenin
29.02.2012 10:20, Martin wrote: If this is not some FPC feature unknown to me I will fix it. http://www.freepascal.org/docs-html/ref/refse24.html#x56-630004.6 questiion is about where the getterr/setter must be defined. btw, they can not be prefixed this fails property FooSinteger read SomeU

Re: [fpc-devel] global property, with getter in other unit

2012-02-28 Thread Martin
On 29/02/2012 02:20, Martin wrote: On 29/02/2012 01:40, Paul Ishenin wrote: 28.02.2012 9:11, Martin пишет: Attached. It needed 3 units, accessing Foo in the same unit, in which it is declared (unit2) compiles (not tested if it runs...) You found some bug in the compiler. Property can only

Re: [fpc-devel] global property, with getter in other unit

2012-02-28 Thread Martin
On 29/02/2012 01:40, Paul Ishenin wrote: 28.02.2012 9:11, Martin пишет: Attached. It needed 3 units, accessing Foo in the same unit, in which it is declared (unit2) compiles (not tested if it runs...) You found some bug in the compiler. Property can only be declared inside a structure but c

Re: [fpc-devel] global property, with getter in other unit

2012-02-28 Thread Paul Ishenin
28.02.2012 9:11, Martin пишет: Attached. It needed 3 units, accessing Foo in the same unit, in which it is declared (unit2) compiles (not tested if it runs...) You found some bug in the compiler. Property can only be declared inside a structure but compiler allowed to do this in a unit level

Re: [fpc-devel] global property, with getter in other unit

2012-02-27 Thread Martin
On 28/02/2012 00:46, Paul Ishenin wrote: 28.02.2012 3:01, Martin пишет: Defining a property in the interface section (outside a class), that refers to methods in another unit, gives an *unexpected* error. It may well be not allowed and then should give an error, but the right error in the right

Re: [fpc-devel] global property, with getter in other unit

2012-02-27 Thread Paul Ishenin
28.02.2012 3:01, Martin пишет: Defining a property in the interface section (outside a class), that refers to methods in another unit, gives an *unexpected* error. It may well be not allowed and then should give an error, but the right error in the right place. Btw, only tested with 2.4.4, apolo

[fpc-devel] global property, with getter in other unit

2012-02-27 Thread Martin
Defining a property in the interface section (outside a class), that refers to methods in another unit, gives an *unexpected* error. It may well be not allowed and then should give an error, but the right error in the right place. Btw, only tested with 2.4.4, apologies if that is fixed in 2.6.