GNOME Bugzilla – Bug 777697
CRITICAL **: vala_ccode_function_add_assignment: assertion 'self != NULL' failed
Last modified: 2017-02-12 18:46:13 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$ """
Created attachment 344154 [details] [review] vala: Non-null initializers of owned variables are not allowed in global scope
Created attachment 344157 [details] [review] vala: Non-null initializers are not allowed for owned namespace fields
Attachment 344157 [details] pushed as 20a1536 - vala: Non-null initializers are not allowed for owned namespace fields