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



commit d774e4d353832657365fa9133dab215a0f05f56f
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]