[Vala] interfaces and properties



Hi, 

Why is it that one *doesn't* have to use override when implementing a
property declared on an interface? I.e.:

interface Animal 
{ 
 public abstract GenericArray<string> names_of_bones { get; set; }
}

class Dog : Object, Animal 
{
 public GenericArray<string> names_of_bones { get; set; }  
}                                                                                                
 
works.

If I try:

 public override GenericArray<string> names_of_bones { get; set; }

valac complains with "no suitable property found to override".

And the problem is that this also works (!):

interface Animal 
{ 
 public abstract GenericArray<string> names_of_bones { get; set; }
}

class Dog : Object, Animal 
{
 public GenericArray<int> names_of_bones { get; set; }  
}                                                                                                

which leads to serious bugs. 

Am I missing something?

Cheers,
Raúl 




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