[Vala] interfaces and properties
- From: Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
- To: vala-list <vala-list gnome org>
- Subject: [Vala] interfaces and properties
- Date: Fri, 04 Feb 2011 00:06:11 +0000
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]