codetools: GetPossibleInitsForVariable: int range

git-svn-id: trunk@47884 -
This commit is contained in:
mattias 2015-02-18 17:20:28 +00:00
parent 825e32fb05
commit bb14ab36ed
2 changed files with 10 additions and 3 deletions

View File

@ -6085,7 +6085,7 @@ begin
case ExprType.Desc of
xtContext:
begin
// ToDo: sets, ranges, records, objects, pointer, class, class of, interface
// ToDo: ranges, records, objects, pointer, class, class of, interface
Node:=ExprType.Context.Node;
Tool:=ExprType.Context.Tool;
case Node.Desc of
@ -6130,6 +6130,11 @@ begin
xtUnicodeString: AddAssignment('''''');
xtPChar: begin AddAssignment('nil'); AddAssignment('#0'); end;
xtPointer: AddAssignment('nil');
xtConstOrdInteger: AddAssignment('0');
xtConstString: AddAssignment('''''');
xtConstReal: AddAssignment('0.0');
xtConstSet: AddAssignment('[]');
xtConstBoolean: begin AddAssignment('False'); AddAssignment('True'); end;
xtLongint,
xtLongWord,
xtWord,

View File

@ -22,7 +22,8 @@ begin
end;
procedure TestLots({%H-}s: string; {%H-}c: char; {%H-}p: pointer;
{%H-}SignalState: TSignalState; {%H-}ShiftState: TShiftState);
{%H-}SignalState: TSignalState; {%H-}ShiftState: TShiftState;
{%H-}HelpCtx: THelpContext);
begin
end;
@ -34,8 +35,9 @@ var
p: Pointer;
SignalState: TSignalState;
ShiftState: TShiftState;
HelpCtx: THelpContext;
begin
TestLots(s,c,p,SignalState,ShiftState);
TestLots(s,c,p,SignalState,ShiftState,HelpCtx);
end;
end.