From 7edc9d0e6ae3cc414e30bd5592cd1675b7954a44 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Wed, 8 Feb 2006 20:33:15 +0000 Subject: [PATCH] * also perform initialised checking for out-parameter, and set the initialised state of value/const/var parameters to initialised git-svn-id: trunk@2487 - --- compiler/htypechk.pas | 3 +-- compiler/symsym.pas | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/htypechk.pas b/compiler/htypechk.pas index fedf31126d..e987558b26 100644 --- a/compiler/htypechk.pas +++ b/compiler/htypechk.pas @@ -804,8 +804,7 @@ implementation not(vo_is_external in hsym.varoptions) and (hsym.owner.symtabletype in [parasymtable,localsymtable,staticsymtable]) and ((hsym.owner=current_procinfo.procdef.localst) or - ((hsym.owner=current_procinfo.procdef.parast) and - (vo_is_funcret in hsym.varoptions))) then + (hsym.owner=current_procinfo.procdef.parast)) then begin if (vo_is_funcret in hsym.varoptions) then begin diff --git a/compiler/symsym.pas b/compiler/symsym.pas index 3fc2bb856a..23717c6d1f 100644 --- a/compiler/symsym.pas +++ b/compiler/symsym.pas @@ -1545,6 +1545,8 @@ implementation constructor tparavarsym.create(const n : string;nr:word;vsp:tvarspez;const tt : ttype;vopts:tvaroptions); begin inherited create(paravarsym,n,vsp,tt,vopts); + if (vsp in [vs_var,vs_value,vs_const]) then + varstate := vs_initialised; paranr:=nr; paraloc[calleeside].init; paraloc[callerside].init;