Russel Winder | 26 Jun 10:12

Re: [groovy-dev] defining a field and a property of the same name

On Thu, 2008-06-26 at 11:16 +0400, Alex Tkachman wrote:
> I hate to deal with
> 
> class A {
>     private int foo
>     String foo
> }

I am confused as to why this is not just a compilation error.  At the
core of this class are two fields of the same name and different types.
Even with:

	class A {
		private int foo
		int foo
	}

it seems like an error to me.

--

-- 
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077

Gmane