In this code we produce a field named foo, a private one... and a property foo with bthe same name. It seems the compiler isn't able to handle this case. The compiler will create yet another field foo and a later step will complain about it, so the user gets the message that the field is declared twice. Now I see two solutions to this.. first one is that we let the property use another field, but then this.foo for example would not access the property field. The other solution would be to fix the handling not to generate a field of this name, but reuse the existing one instead. The third option would be to not to allow this... but being able to change the visibiblity of the field, for example to protected, could be interesting to have as well. So I suggest to go with optiontwo and fix it.