After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794733 - Gtk.Border compile error (0.40.0 regression)
Gtk.Border compile error (0.40.0 regression)
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings: GTK+ GStreamer WebKitGTK+
0.40.x
Other Linux
: Normal normal
: 0.42
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-27 16:31 UTC by eyelash
Modified: 2018-03-28 09:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
source code that triggers the error (86 bytes, text/x-vala)
2018-03-27 16:31 UTC, eyelash
  Details
gtk+-*.0: Hide dedicated constructor for GtkBorder which is bound as struct (2.24 KB, patch)
2018-03-27 16:51 UTC, Rico Tzschichholz
none Details | Review
gtk+-*.0: Hide dedicated constructors of compact classes bound as structs (3.18 KB, patch)
2018-03-27 20:44 UTC, Rico Tzschichholz
committed Details | Review

Description eyelash 2018-03-27 16:31:55 UTC
Created attachment 370208 [details]
source code that triggers the error

When trying to compile the attached source code with valac 0.40.0 I get the following error message:

test.vala.c: In function ‘_vala_main’:
test.vala.c:24:14: warning: implicit declaration of function ‘gtk_border_init’; did you mean ‘gtk_border_new’? [-Wimplicit-function-declaration]
  (GtkBorder) gtk_border_init (&border);
              ^~~~~~~~~~~~~~~
              gtk_border_new
test.vala.c:24:2: error: conversion to non-scalar type requested
  (GtkBorder) gtk_border_init (&border);
  ^
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
Comment 1 Rico Tzschichholz 2018-03-27 16:51:12 UTC
Created attachment 370210 [details] [review]
gtk+-*.0: Hide dedicated constructor for GtkBorder which is bound as struct
Comment 2 Rico Tzschichholz 2018-03-27 20:44:19 UTC
Created attachment 370218 [details] [review]
gtk+-*.0: Hide dedicated constructors of compact classes bound as structs
Comment 3 Rico Tzschichholz 2018-03-28 06:41:52 UTC
Attachment 370218 [details] pushed as 54be0bf - gtk+-*.0: Hide dedicated constructors of compact classes bound as structs
Comment 4 eyelash 2018-03-28 09:39:11 UTC
Thank you for fixing this so quickly.

I wonder if the copy and free functions should be hidden as well. They were all introduced in commit a8e6aff63e5e1502290ba93398314acf2ad45b60.