[vala/wip/ricotz/lsp-rev: 12/13] WIP vala: Improve detection of recursive class declarations



commit 4cdffe1840cd24a51b3fdfd3169fb2aa10d056f8
Author: Princeton Ferro <princetonferro gmail com>
Date:   Tue Feb 18 10:39:54 2020 +0100

    WIP vala: Improve detection of recursive class declarations

 vala/valaclass.vala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/vala/valaclass.vala b/vala/valaclass.vala
index e9312c415..4c78851eb 100644
--- a/vala/valaclass.vala
+++ b/vala/valaclass.vala
@@ -448,7 +448,8 @@ public class Vala.Class : ObjectTypeSymbol {
                }
 
                foreach (DataType base_type in base_types) {
-                       if (base_type.type_symbol != null && base_type.type_symbol.is_subtype_of (t)) {
+                       if (base_type.type_symbol != null && base_type.type_symbol != this
+                           && base_type.type_symbol.is_subtype_of (t)) {
                                return true;
                        }
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]