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 777697 - CRITICAL **: vala_ccode_function_add_assignment: assertion 'self != NULL' failed
CRITICAL **: vala_ccode_function_add_assignment: assertion 'self != NULL' failed
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.35.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-24 14:42 UTC by Vladislav
Modified: 2017-02-12 18:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
source code (84 bytes, text/x-genie)
2017-01-24 14:42 UTC, Vladislav
  Details
vala: Non-null initializers of owned variables are not allowed in global scope (1.97 KB, patch)
2017-01-24 15:15 UTC, Rico Tzschichholz
none Details | Review
vala: Non-null initializers are not allowed for owned namespace fields (1.96 KB, patch)
2017-01-24 15:28 UTC, Rico Tzschichholz
committed Details | Review

Description Vladislav 2017-01-24 14:42:44 UTC
Created attachment 344153 [details]
source code

When I tried to compile this source code: 
"""
init
	a: string = "safd"

namespace SomeNamespace
	b: int = 4
	c: string = "sdfd"
"""



, then I have such error: 
"""
** (valac-0.36:4152): CRITICAL **: vala_ccode_function_add_declaration: assertion 'self != NULL' failed
"""




Full terminal output: 
"""
vlad@deb:~/for_Programs/programming/languages/Vala_Genie/issues/issue_with_initiating_strings_in_namespace$ '/home/vlad/Programs/programming/languages/Genie/valac/installed_v2/bin/valac-0.36' '/home/vlad/for_Programs/programming/languages/Vala_Genie/issues/issue_with_initiating_strings_in_namespace/test_strings.gs' 
/home/vlad/for_Programs/programming/languages/Vala_Genie/issues/issue_with_initiating_strings_in_namespace/test_strings.gs:2.12-2.20: warning: local variable `a' declared but never used
	a: string = "safd"
	          ^^^^^^^^^

** (valac-0.36:4152): CRITICAL **: vala_ccode_function_add_declaration: assertion 'self != NULL' failed

** (valac-0.36:4152): CRITICAL **: vala_ccode_function_add_assignment: assertion 'self != NULL' failed
/home/vlad/for_Programs/programming/languages/Vala_Genie/issues/issue_with_initiating_strings_in_namespace/test_strings.gs:7.2-7.10: error: Non-constant field initializers not supported in this context
	c: string = "sdfd"
	^^^^^^^^^
Compilation failed: 1 error(s), 1 warning(s)
vlad@deb:~/for_Programs/programming/languages/Vala_Genie/issues/issue_with_initiating_strings_in_namespace$ 
"""
Comment 1 Rico Tzschichholz 2017-01-24 15:15:13 UTC
Created attachment 344154 [details] [review]
vala: Non-null initializers of owned variables are not allowed in global scope
Comment 2 Rico Tzschichholz 2017-01-24 15:28:40 UTC
Created attachment 344157 [details] [review]
vala: Non-null initializers are not allowed for owned namespace fields
Comment 3 Rico Tzschichholz 2017-02-12 18:46:07 UTC
Attachment 344157 [details] pushed as 20a1536 - vala: Non-null initializers are not allowed for owned namespace fields