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



commit 79afc63c1c4b55d9b0ac01a578724882937f9068
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 d5288a757..586fe287f 100644
--- a/vala/valaclass.vala
+++ b/vala/valaclass.vala
@@ -454,7 +454,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]