Browse Source

* protect against comparisons of nested types of generics and specializations

Sven/Sarah Barth 1 year ago
parent
commit
ddc2259e5e
1 changed files with 4 additions and 2 deletions
  1. 4 2
      compiler/defcmp.pas

+ 4 - 2
compiler/defcmp.pas

@@ -473,11 +473,13 @@ implementation
          if (
                (df_generic in def_to.defoptions) and
                (df_specialization in def_from.defoptions) and
-               (tstoreddef(def_from).genericdef=def_to)
+               (tstoreddef(def_from).genericdef=def_to) and
+               assigned(tstoreddef(def_to).genericparas)
              ) or (
                (df_generic in def_from.defoptions) and
                (df_specialization in def_to.defoptions) and
-               (tstoreddef(def_to).genericdef=def_from)
+               (tstoreddef(def_to).genericdef=def_from) and
+               assigned(tstoreddef(def_from).genericparas)
              ) then
            begin
              if tstoreddef(def_from).genericdef=def_to then