fix #1994
This commit is contained in:
parent
b21c2c0aa3
commit
882109efa0
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
||||||
public const string Major = "3";
|
public const string Major = "3";
|
||||||
public const string Minor = "5";
|
public const string Minor = "5";
|
||||||
public const string Build = "0";
|
public const string Build = "0";
|
||||||
public const string Revision = "2194";
|
public const string Revision = "2195";
|
||||||
|
|
||||||
public const string MainVersion = Major + "." + Minor;
|
public const string MainVersion = Major + "." + Minor;
|
||||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%COREVERSION%=0
|
|
||||||
%REVISION%=2194
|
|
||||||
%MINOR%=5
|
%MINOR%=5
|
||||||
|
%REVISION%=2195
|
||||||
|
%COREVERSION%=0
|
||||||
%MAJOR%=3
|
%MAJOR%=3
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
!define VERSION '3.5.0.2194'
|
!define VERSION '3.5.0.2195'
|
||||||
|
|
|
||||||
8
TestSuite/for_i_finishValue.pas
Normal file
8
TestSuite/for_i_finishValue.pas
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
begin
|
||||||
|
var s := 0;
|
||||||
|
for var i := -3 to i do
|
||||||
|
begin
|
||||||
|
s += i;
|
||||||
|
end;
|
||||||
|
Assert(s=-3);
|
||||||
|
end.
|
||||||
|
|
@ -81,7 +81,8 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
// AddError(new VoidNotValid(get_location(_for_node.type_name)))
|
// AddError(new VoidNotValid(get_location(_for_node.type_name)))
|
||||||
if (_for_node.type_name != null)
|
if (_for_node.type_name != null)
|
||||||
check_for_type_allowed(tn, get_location(_for_node.type_name));
|
check_for_type_allowed(tn, get_location(_for_node.type_name));
|
||||||
vdn = context.add_var_definition(_for_node.loop_variable.name, get_location(_for_node.loop_variable), tn, polymorphic_state.ps_common);
|
vdn = context.add_var_definition(_for_node.loop_variable.name, get_location(_for_node.loop_variable), tn, initialValue/*, polymorphic_state.ps_common*/);
|
||||||
|
vdn.polymorphic_state = polymorphic_state.ps_common;
|
||||||
}
|
}
|
||||||
internal_interface ii = vdn.type.get_internal_interface(internal_interface_kind.ordinal_interface);
|
internal_interface ii = vdn.type.get_internal_interface(internal_interface_kind.ordinal_interface);
|
||||||
if (ii == null)
|
if (ii == null)
|
||||||
|
|
@ -93,7 +94,7 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
|
|
||||||
location finishValueLocation = get_location(_for_node.finish_value);
|
location finishValueLocation = get_location(_for_node.finish_value);
|
||||||
var_definition_node vdn_finish = context.create_for_temp_variable(vdn.type, finishValueLocation);
|
var_definition_node vdn_finish = context.create_for_temp_variable(vdn.type, finishValueLocation);
|
||||||
//Это должно стаять первее!
|
//Это должно стоять раньше!!
|
||||||
left = create_variable_reference(vdn_finish, loopVariableLocation);
|
left = create_variable_reference(vdn_finish, loopVariableLocation);
|
||||||
expression_node finishValue = convert_strong(_for_node.finish_value);
|
expression_node finishValue = convert_strong(_for_node.finish_value);
|
||||||
right = finishValue;
|
right = finishValue;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue