Due to Debian 11 having an outdated version of valac, some of the newer syntactic sugar does not work. This patch makes VLS compile-able on Debian 11 again.
=== modified file 'src/protocol.vala'
--- old/src/protocol.vala 2023-03-01 16:14:01 +0000
+++ new/src/protocol.vala 2023-04-30 17:17:17 +0000
@@ -145,10 +145,9 @@
* Return a new range that includes `this` and `other`.
*/
public Range union (Range other) {
- var range = new Range () {
- start = start.compare_to (other.start) < 0 ? start : other.start,
- end = end.compare_to (other.end) < 0 ? other.end : end,
- };
+ var range = new Range ();
+ range.start = start.compare_to (other.start) < 0 ? start : other.start;
+ range.end = end.compare_to (other.end) < 0 ? other.end : end;
if (filename == other.filename)
range.filename = filename;
return range;
Due to Debian 11 having an outdated version of
valac
, some of the newer syntactic sugar does not work. This patch makes VLS compile-able on Debian 11 again.Thank you.