GNOME Bugzilla – Bug 607955
Symbol resolving broken for base types of structs
Last modified: 2010-02-04 16:22:22 UTC
Created attachment 152162 [details] [review] x11.patch as sent by pancake Quoting: http://mail.gnome.org/archives/vala-list/2010-January/msg00136.html Using Gdk and X11 packages results in a compilation error: x11.vapi:295.2-295.32: error: The base type `Gdk.Drawable` of struct `X.Window` is not a struct public struct Window : Drawable { x11.vapi:284.27-284.28: error: The type name `ID' could not be found public struct Drawable : ID patch is attached. But probably Vala should priorize the name resolution if the type is defined inside the same namespace (this solution will be better, but will require a patch in vala compiler) This is only broken in git. 0.7.9 is ok --pancake
I cannot reproduce this issue with current vala-git, so I think that it's time to close this ticket. Sorry for the noise.
Closing since pancake could not reproduce it.
The issue is still happening. The next one is a test case: [test.vala] void main(string[] args) { Gtk.init(ref args); var window = new Gtk.Window(0); window.realize(); uint32 xid = Gdk.x11_drawable_get_xid(window.window); print("The WID is %h", xid); window.show_all(); Gtk.main(); } [/test.vala] $ 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)
It would be better to resolve the real issue, instead of working around it by patching the vapi--especially since it was working in 0.7.9. I've gone ahead and used your test case to do a bisect: c1ee2f13806678f7b8a3e9a058b62e31fcbc7a2d is the first bad commit commit c1ee2f13806678f7b8a3e9a058b62e31fcbc7a2d Author: Jürg Billeter <j@bitron.ch> Date: Thu Jan 14 12:51:00 2010 +0100 Fix order dependency in type resolution with derived integer types :040000 040000 c2523be75d4b1d006470b05fa11f5854ee847ec8 c74a8a3732a74ca49f439aab524798b3625f16ca M vala bisect run success
This is a bug in the symbol resolver.
commit e3a8480ff498d2fae7c90448bfc86e7ea50c2dff Author: Jürg Billeter <j@bitron.ch> Date: Thu Feb 4 17:20:08 2010 +0100 Fix symbol resolving for base types of structs Fixes bug 607955.