File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -2293,6 +2293,16 @@ function TBuildParseTree.RecogniseVarDecl(const inlineVar: boolean): boolean;
22932293 end
22942294 else
22952295 RecogniseIdentList(False);
2296+
2297+ // check if we are inside a for loop header
2298+ lc := fcTokenList.FirstSolidToken;
2299+ if lc.TokenType = ttIn then
2300+ begin
2301+ // Delphi 2005 syntax
2302+ PopNode;
2303+ Exit;
2304+ end ;
2305+
22962306 Recognise(ttColon);
22972307 RecogniseType;
22982308
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ function myFunction(aParam: string
3636var inline_var_decl2_string, inline_var_decl3_string: string := ' this is a string' ;
3737
3838 const inline_const := 999 ;
39+
40+ for var currentField in fieldList do
41+ begin
42+ var inline_var_decl4: string = ' a string' ;
43+ end ;
3944
4045 for i := 1 to 10 do
4146 if i < 10 then write(i, ' ,' )
You can’t perform that action at this time.
0 commit comments