LSP: Remove warnings at runtime
When used with GVls, there parsing and checks, for diagnostics, fails making the server crash with an error:
GLib-GObject-WARNING **: 17:34:36.634: invalid cast from 'ValaInvalidType' to 'ValaErrorType'
This is reproducible using GNOME Builder Nightly, with support for GVls
and open Vala
as project.
There are room to improve checks and act on time, before call a method.
Full, almost, messages are:
(.:915): vala-CRITICAL **: 17:34:36.632: vala_method_get_closure: assertion 'self != NULL' failed
(.:915): vala-CRITICAL **: 17:34:36.634: vala_phi_function_construct: assertion 'variable != NULL' failed
(.:915): vala-CRITICAL **: 17:34:36.634: vala_basic_block_add_phi_function: assertion 'phi != NULL' failed
(.:915): vala-CRITICAL **: 17:34:36.634: vala_phi_function_construct: assertion 'variable != NULL' failed
(.:915): vala-CRITICAL **: 17:34:36.634: vala_basic_block_add_phi_function: assertion 'phi != NULL' failed
(.:915): vala-CRITICAL **: 17:34:36.634: vala_flow_analyzer_process_assignment: assertion 'var_symbol != NULL' failed
(.:915): vala-CRITICAL **: 17:34:36.634: vala_collection_get_size: assertion 'self != NULL' failed
(.:915): vala-CRITICAL **: 17:34:36.634: vala_list_remove_at: assertion 'self != NULL' failed
(.:915): GLib-GObject-WARNING **: 17:34:36.634: invalid cast from 'ValaInvalidType' to 'ValaErrorType'