From 9eafe4139d6b2c0cabe3c77a903d6ae931a26975 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Thu, 24 Aug 2023 20:18:26 +0200 Subject: Fix build on some Vala compiler versions See https://gitlab.gnome.org/GNOME/vala/-/issues/1474 and https://gitlab.gnome.org/GNOME/vala/-/issues/1478 --- libdino/src/service/stream_interactor.vala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libdino/src') diff --git a/libdino/src/service/stream_interactor.vala b/libdino/src/service/stream_interactor.vala index 192460d4..5d248327 100644 --- a/libdino/src/service/stream_interactor.vala +++ b/libdino/src/service/stream_interactor.vala @@ -89,7 +89,12 @@ public class ModuleIdentity : Object { } public T? cast(StreamInteractionModule module) { +#if VALA_0_56_11 + // We can't typecheck due to compiler bug + return (T) module; +#else return module.get_type().is_a(typeof(T)) ? (T?) module : null; +#endif } public bool matches(StreamInteractionModule module) { -- cgit v1.2.3-54-g00ecf