Частично 2199
This commit is contained in:
parent
735e051a87
commit
913efed79b
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "6";
|
||||
public const string Build = "3";
|
||||
public const string Revision = "2541";
|
||||
public const string Revision = "2543";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=6
|
||||
%REVISION%=2541
|
||||
%REVISION%=2543
|
||||
%COREVERSION%=3
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.6.3.2541
|
||||
3.6.3.2543
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.6.3.2541'
|
||||
!define VERSION '3.6.3.2543'
|
||||
|
|
|
|||
21
TestSuite/StaticInLam1.pas
Normal file
21
TestSuite/StaticInLam1.pas
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
//#2199 - частично
|
||||
type
|
||||
t0<T2> = class
|
||||
end;
|
||||
|
||||
t2 = class(t0<integer>)
|
||||
static function p1 := 33;
|
||||
procedure ppp;
|
||||
begin
|
||||
Assert(p1=33);
|
||||
Assert(t2.p1=33);
|
||||
//t0&<integer>.p1;
|
||||
{var p: ()->() := ()->
|
||||
begin
|
||||
end;}
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
t2.Create.ppp;
|
||||
end.
|
||||
|
|
@ -827,9 +827,18 @@ namespace SymbolTable
|
|||
{
|
||||
while (cl.BaseClassScope != null)
|
||||
{
|
||||
tn = cl.BaseClassScope.Symbols.Find(name);
|
||||
tn = cl.BaseClassScope.Symbols.Find(name); // SSM 30/06/20 - надо исключать generis-параметры из поиска - их не существует в производном классе!!!
|
||||
if (tn != null)
|
||||
AddToSymbolInfo(tn.InfoList, Result);
|
||||
{
|
||||
if (tn.InfoList[0].sym_info is PascalABCCompiler.TreeRealization.common_type_node cctt && cctt.is_generic_parameter)
|
||||
{
|
||||
// пропустить!!!
|
||||
}
|
||||
else
|
||||
{
|
||||
AddToSymbolInfo(tn.InfoList, Result);
|
||||
}
|
||||
}
|
||||
|
||||
ar = cl.BaseClassScope;
|
||||
if (ar is DotNETScope)
|
||||
|
|
|
|||
|
|
@ -1658,13 +1658,13 @@ namespace PascalABCCompiler.TreeConverter
|
|||
private void convert_function_call_expressions(function_node fn,expressions_list exprs,
|
||||
possible_type_convertions_list ptcal)
|
||||
{
|
||||
var needToConvertParamsToFunctionCall = true;
|
||||
var needToConvertParamsToFunctionCall = true; // SSM #2079 29/06/20
|
||||
var lastIsParams = fn.parameters.Count > 0 && fn.parameters[fn.parameters.Count - 1].is_params;
|
||||
if (lastIsParams && fn.parameters[fn.parameters.Count - 1].type.element_type.IsDelegate)
|
||||
needToConvertParamsToFunctionCall = false; // параметры params - преобразовывать ли в вызовы
|
||||
|
||||
|
||||
for (int i = 0; i < exprs.Count; i++)
|
||||
for (int i = 0; i < exprs.Count; i++)
|
||||
{
|
||||
// надо отдельно расшифровывать params и в них тоже не преобразовывать если там делегаты
|
||||
// Если функция возвращает функцию, то это к сожалению не будет работать
|
||||
|
|
@ -1678,7 +1678,8 @@ namespace PascalABCCompiler.TreeConverter
|
|||
syntax_tree_visitor.try_convert_typed_expression_to_function_call(ref ex);
|
||||
exprs[i] = ex;
|
||||
}
|
||||
}
|
||||
} // SSM end 29/06/20
|
||||
|
||||
for (int i=0;i<exprs.Count;i++)
|
||||
{
|
||||
if ((ptcal.snl != null) && (i >= fn.parameters.Count - 1))
|
||||
|
|
|
|||
Loading…
Reference in a new issue