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 780050 - CRITICAL **: vala_data_type_get_nullable: assertion 'self != NULL' failed
CRITICAL **: vala_data_type_get_nullable: assertion 'self != NULL' failed
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Basic Types
0.35.x
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-14 18:55 UTC by Ole André Vadla Ravnås
Modified: 2017-03-14 22:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vala: Fix MemberAccess.is_non_null() for enum value constants (1.79 KB, patch)
2017-03-14 19:48 UTC, Ole André Vadla Ravnås
none Details | Review
vala: Fix MemberAccess.is_non_null() for EnumValue constants (1.63 KB, patch)
2017-03-14 21:42 UTC, Rico Tzschichholz
committed Details | Review

Description Ole André Vadla Ravnås 2017-03-14 18:55:26 UTC
When a namespace has an enum value with an initializer, e.g.:

namespace Foo {
	public ApplicationFlags flags = ApplicationFlags.FLAGS_NONE;
}

This is a regression introduced by:
https://bugzilla.gnome.org/show_bug.cgi?id=777697

I'll take a stab at a test-case and fix.
Comment 1 Ole André Vadla Ravnås 2017-03-14 19:48:44 UTC
Created attachment 347943 [details] [review]
vala: Fix MemberAccess.is_non_null() for enum value constants

OTOH whether an EnumValue should have a type is a question that I'm not
able to answer.
Comment 2 Ole André Vadla Ravnås 2017-03-14 19:50:34 UTC
(In reply to Ole André Vadla Ravnås from comment #0)
> This is a regression introduced by:
> https://bugzilla.gnome.org/show_bug.cgi?id=777697

FWIW this turned out to be false – it was just exposing a bug already there.
Comment 3 Rico Tzschichholz 2017-03-14 21:42:01 UTC
Created attachment 347957 [details] [review]
vala: Fix MemberAccess.is_non_null() for EnumValue constants

This is because an EnumValue object does not have a type reference.
Comment 4 Ole André Vadla Ravnås 2017-03-14 21:59:19 UTC
Review of attachment 347957 [details] [review]:

Much better!
Comment 5 Rico Tzschichholz 2017-03-14 22:03:43 UTC
commit b57a9f8b1c21ec7cf685ead4a0aee093cd2c3357
Author: Ole André Vadla Ravnås <oleavr@gmail.com>
Date:   Tue Mar 14 20:44:45 2017 +0100

    vala: Fix MemberAccess.is_non_null() for EnumValue constants
    
    This is because an EnumValue object does not have a type reference.