Re: [Vala] Issue still in master [The base type `Gdk.Drawable` of struct `X.Window` is not a struct]

For me it was like that, failing in vala-git but working in 079

On Jan 26, 2010, at 9:07 PM, Jan Hudec <bulb ucw cz> wrote:

On Tue, Jan 26, 2010 at 12:59:25 -0600, Sandino Flores Moreno wrote:
The problem arises when using the package gdk-x11-2.0

Test case:

$ cat test.vala
void main(string[] args)
      Gtk.init(ref args);
      var window = new Gtk.Window(0);
      uint32 xid = Gdk.x11_drawable_get_xid(window.window);
      print("The WID is %h", xid);

$ valac test.vala --pkg gtk+-2.0 --pkg gdk-x11-2.0
x11.vapi:295.2-295.32: error: The base type `Gdk.Drawable` of struct
`X.Window` is not a struct
      public struct Window : Drawable {
Compilation failed: 1 error(s), 0 warning(s)

Does not fail with 0.7.9 here.

Note, that it seems to be a problem with name resolution -- parent of
X.Window is supposed to be X.Drawable which is defined right above it, not
Gdk.Drawable. That suggests something along the lines

   namespace N1 {
       public class A {
           public int i;

   namespace N2 {
       public struct A {
           public int i;

       public struct B : A {
           public int j;

   int main(string[] args)
       return 0;

is likely to fail the same way (I didn't try myself yet, since with my
installed 0.7.9 the problem does not seem to happen as mentioned above).

                        Jan 'Bulb' Hudec <bulb ucw cz>
Vala-list mailing list
Vala-list gnome org

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