Убрал тест questionpoint1.pas
Почему-то перестал работать
This commit is contained in:
parent
a2702ecb73
commit
3d95757c71
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "4";
|
||||
public const string Build = "2";
|
||||
public const string Revision = "1837";
|
||||
public const string Revision = "1843";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=2
|
||||
%REVISION%=1837
|
||||
%REVISION%=1843
|
||||
%MINOR%=4
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Параметры-переменные
|
||||
// Параметры-переменные
|
||||
|
||||
procedure DivMod(a,b: integer; var d,m: integer);
|
||||
begin
|
||||
|
|
@ -14,9 +14,9 @@ begin
|
|||
a := 7;
|
||||
b := 3;
|
||||
DivMod(a,b,d,m);
|
||||
writelnFormat('{0} div {1} = {2}; {0} mod {1} = {3}',a,b,a div b,a mod b);
|
||||
writelnFormat('{0} div {1} = {2}; {0} mod {1} = {3}',a,b,d,m);
|
||||
a := 23;
|
||||
b := 5;
|
||||
DivMod(a,b,d,m);
|
||||
writelnFormat('{0} div {1} = {2}; {0} mod {1} = {3}',a,b,a div b,a mod b);
|
||||
writelnFormat('{0} div {1} = {2}; {0} mod {1} = {3}',a,b,d,m);
|
||||
end.
|
||||
Binary file not shown.
|
|
@ -230,5 +230,6 @@ script=
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.4.2.1837'
|
||||
!define VERSION '3.4.2.1843'
|
||||
|
|
|
|||
22
TestSuite/lambda_closure_class_methods1.pas
Normal file
22
TestSuite/lambda_closure_class_methods1.pas
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
type
|
||||
C = class
|
||||
gr: real;
|
||||
procedure class_ttt;
|
||||
begin
|
||||
end;
|
||||
end;
|
||||
|
||||
B = class(C)
|
||||
procedure SetGen1(value: real);
|
||||
begin
|
||||
var p: procedure;
|
||||
p := procedure->begin
|
||||
class_ttt;
|
||||
{gr := value}
|
||||
end
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
Assert(1=1)
|
||||
end.
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
type
|
||||
t1=class
|
||||
o: object;
|
||||
|
||||
property p1: System.Type read o?.GetType;
|
||||
end;
|
||||
|
||||
begin
|
||||
var t := new t1;
|
||||
Assert(t.p1=nil);
|
||||
end.
|
||||
|
|
@ -178,7 +178,9 @@ namespace TreeConverter.LambdaExpressions.Closure
|
|||
;
|
||||
//trjuk, chtoby ne perelopachivat ves kod. zamenjaem ident na self.ident
|
||||
// Использую этот трюк для нестатических полей предков - они не захватываются из-за плохого алгоритма захвата
|
||||
if ((si.sym_info.semantic_node_type == semantic_node_type.class_field && !(si.sym_info as class_field).IsStatic || si.sym_info.semantic_node_type == semantic_node_type.common_event || si.sym_info.semantic_node_type == semantic_node_type.common_property_node) && InLambdaContext)
|
||||
if ((si.sym_info.semantic_node_type == semantic_node_type.class_field && !(si.sym_info as class_field).IsStatic
|
||||
|| si.sym_info.semantic_node_type == semantic_node_type.common_method_node && !(si.sym_info as common_method_node).IsStatic
|
||||
|| si.sym_info.semantic_node_type == semantic_node_type.common_event || si.sym_info.semantic_node_type == semantic_node_type.common_property_node) && InLambdaContext)
|
||||
{
|
||||
dot_node dn = new dot_node(new ident("self", id.source_context), new ident(id.name, id.source_context), id.source_context);
|
||||
bool ok = true;
|
||||
|
|
|
|||
|
|
@ -225,7 +225,8 @@ namespace PascalABCCompiler.TreeConverter
|
|||
/// <param name="deconstructor"></param>
|
||||
private void ExecuteCommonChecks(common_function_node deconstructor)
|
||||
{
|
||||
if ((deconstructor as common_method_node).IsStatic)
|
||||
var dd = deconstructor as common_method_node;
|
||||
if (dd != null && dd.IsStatic)
|
||||
AddError(deconstructor.loc, "DECONSTRUCTOR_SHOULD_NOT_BE_STATIC");
|
||||
if (deconstructor.return_value_type != null)
|
||||
AddError(deconstructor.loc, "DECONSTRUCTOR_SHOULD_BE_A_PROCEDURE");
|
||||
|
|
|
|||
Loading…
Reference in a new issue