fix #2152
This commit is contained in:
parent
50e8705a7a
commit
e48218cd9e
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "6";
|
||||
public const string Build = "2";
|
||||
public const string Revision = "2385";
|
||||
public const string Revision = "2386";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=6
|
||||
%REVISION%=2385
|
||||
%COREVERSION%=2
|
||||
%REVISION%=2386
|
||||
%MINOR%=6
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.6.2.2385
|
||||
3.6.2.2386
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.6.2.2385'
|
||||
!define VERSION '3.6.2.2386'
|
||||
|
|
|
|||
|
|
@ -57,18 +57,22 @@ namespace SyntaxVisitors
|
|||
{
|
||||
// Declaration: fields + procedure defs + headers + etc
|
||||
// Need vars
|
||||
if (decl is var_def_statement)
|
||||
if (decl is var_def_statement vds)
|
||||
{
|
||||
var vars = (decl as var_def_statement).vars;
|
||||
CollectedFields.UnionWith(vds.vars.idents);
|
||||
// Fields
|
||||
foreach (var field in vars.idents)
|
||||
/*foreach (var field in vds.vars.idents)
|
||||
{
|
||||
CollectedFields.Add(field);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else if (decl is simple_const_definition scd)
|
||||
{
|
||||
CollectedFields.Add(scd.const_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
15
TestSuite/yield_class_const.pas
Normal file
15
TestSuite/yield_class_const.pas
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
type
|
||||
t1 = class
|
||||
v1: integer;
|
||||
const c1 = 5;
|
||||
|
||||
function f1: sequence of byte;
|
||||
begin
|
||||
yield c1;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
begin
|
||||
Assert(True);
|
||||
end.
|
||||
|
|
@ -20215,6 +20215,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
isStaticIdent = CheckIsStaticName(found_unit.sym_info);
|
||||
|
||||
if (found_unit.sym_info is class_field
|
||||
|| found_unit.sym_info is class_constant_definition // SSM #2152
|
||||
|| found_unit.sym_info is common_method_node
|
||||
|| found_unit.sym_info is common_property_node
|
||||
|| found_unit.sym_info is compiled_function_node
|
||||
|
|
|
|||
Loading…
Reference in a new issue