Re: [Vala] Are nested interfaces disallowed?
- From: Anatol Pomozov <anatol pomozov gmail com>
- To: vala <vala-list gnome org>
- Subject: Re: [Vala] Are nested interfaces disallowed?
- Date: Fri, 7 Jan 2011 11:35:49 -0800
ping.
Are nested classes/interfaces officially supported in vala?
Classes seems work fine with vala 0.10 [1], but not interfaces.
1)
public class AClass {
public class BClass {
public void print() {
stdout.printf("Hello, world!\n");
}
}
}
void main() {
var cl = new AClass.BClass();
cl.print();
}
On Tue, Dec 28, 2010 at 4:42 PM, Anatol Pomozov
<anatol pomozov gmail com> wrote:
Hi,
I have a class and I want to add a nested interface into it.
public class AClass : Object {
public interface BClass : Object { public void foo() { } }
}
Valac 0.10.0 fails with following error:
a.vala:2.2-2.33: error: unexpected declaration in class
public interface BClass : Object {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This sounds weird. If I change 'interface' to 'class' valac is ok with
it and compiles my program without any error.
What is the reason of nested interfaces prohibition?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]