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 637177 - Nested types should be allowed in aliases
Nested types should be allowed in aliases
Status: RESOLVED DUPLICATE of bug 629682
Product: gobject-introspection
Classification: Platform
Component: general
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-12-13 19:20 UTC by Michael Terry
Modified: 2015-02-07 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (310 bytes, application/x-shellscript)
2010-12-13 19:21 UTC, Michael Terry
Details

Description Michael Terry 2010-12-13 19:20:40 UTC
A typedef like the following:

typedef GSList TestSList;


Generates the following in gir:

<alias name="SList" c:type="TestSList">
  <type name="GLib.SList" c:type="GSList">
    <type name="gpointer" c:type="gpointer"/>
  </type>
</alias>


Which g-ir-compiler does not like:

Test-0.0.gir:16:50: error: The element <type> is invalid here
error parsing file Test-0.0.gir: The element <type> is invalid here


Nested types seem allowed in other places.  I suspect this is due to the special alias handling in girparser.c:start_type(), but did not know the code well enough to propose a solution.

I've attached a simple script to reproduce the problem.
Comment 1 Michael Terry 2010-12-13 19:21:24 UTC
Created attachment 176359 [details]
Test case
Comment 2 Michael Terry 2010-12-15 20:11:49 UTC
Hmm, this might be a dup of bug 629682.
Comment 3 Martin Pitt 2012-11-20 06:21:41 UTC
This works fine now, so indeed looks like a duplicate.

*** This bug has been marked as a duplicate of bug 629682 ***
Comment 4 André Klapper 2015-02-07 16:52:54 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]