Re: [Vala] property overrides need to be declared public?



On Fri, 2008-06-27 at 22:42 -0700, Michael Lawrence wrote:
When overriding a property, I found that I needed to declare it
'public' before it was actually accessible (i.e. the internal getter
function was defined but the override was not registered in
class_init). Is this by design? It's certainly strange to privately
override something.

The convention in Vala and C# are that the accessibility of the
overriding method must be the same as the accessibility of the
overridden method. We might want to consider to allow more flexibility
at some point, however, at the moment you should follow the convention.

Juerg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]