Add check about tloadnode.symtableentry type before typecast

git-svn-id: trunk@40121 -
This commit is contained in:
pierre 2018-10-31 23:16:51 +00:00
parent 0abc978cc4
commit bb219cd05a

View File

@ -4594,7 +4594,8 @@ implementation
((tloadnode(n).symtable.symtabletype = staticsymtable) and
(tloadnode(n).symtable = TSymtable(arg))) or
{ if the addr of the symbol is taken somewhere, it can be also non-local }
(tabstractvarsym(tloadnode(n).symtableentry).addr_taken)
((tloadnode(n).symtableentry is tabstractvarsym) and
(tabstractvarsym(tloadnode(n).symtableentry).addr_taken))
)
) or
((n.nodetype = subscriptn) and