This commit is contained in:
parent
02f177d5ba
commit
0664033ee2
20
TestSuite/units/u_records7.pas
Normal file
20
TestSuite/units/u_records7.pas
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
unit u_records6;
|
||||
|
||||
type
|
||||
intr = interface
|
||||
procedure p;
|
||||
end;
|
||||
|
||||
r = record(intr)
|
||||
// Обязательно использовать тот же конструктор, что и в p1
|
||||
procedure p := new r;
|
||||
end;
|
||||
|
||||
// Обязательно принимать интерфейс
|
||||
procedure p0(o: intr) := exit;
|
||||
|
||||
// Обязательно передать экземпляр r, не присвоенный ни одной переменной
|
||||
// (можно использовать как простой обход)
|
||||
procedure p1 := p0(new r);
|
||||
|
||||
end.
|
||||
4
TestSuite/usesunits/use_records7.pas
Normal file
4
TestSuite/usesunits/use_records7.pas
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
uses u_records7;
|
||||
begin
|
||||
p1;
|
||||
end.
|
||||
|
|
@ -472,7 +472,7 @@ namespace PascalABCCompiler.TreeRealization
|
|||
[Serializable]
|
||||
public class common_static_method_call : base_function_call_with_method<common_method_node>, SemanticTree.ICommonStaticMethodCallNode
|
||||
{
|
||||
private common_type_node _common_type;
|
||||
private common_type_node _common_type;//zachem dublirovat svojstvo iz common_method_node????
|
||||
|
||||
public common_static_method_call(common_method_node static_method,location loc) :
|
||||
base(static_method,loc)
|
||||
|
|
@ -486,7 +486,9 @@ namespace PascalABCCompiler.TreeRealization
|
|||
{
|
||||
get
|
||||
{
|
||||
return _common_type;
|
||||
if (_common_type != null)
|
||||
return _common_type;
|
||||
return function_node.cont_type;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -508,7 +510,9 @@ namespace PascalABCCompiler.TreeRealization
|
|||
{
|
||||
get
|
||||
{
|
||||
return _common_type;
|
||||
if (_common_type != null)
|
||||
return _common_type;
|
||||
return function_node.cont_type;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue