fix #2252
This commit is contained in:
parent
600b830239
commit
41316f86d1
|
|
@ -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 = "2499";
|
||||
public const string Revision = "2500";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=6
|
||||
%REVISION%=2499
|
||||
%COREVERSION%=3
|
||||
%REVISION%=2500
|
||||
%MINOR%=6
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
3.6.3.2499
|
||||
3.6.3.2500
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.6.3.2499'
|
||||
!define VERSION '3.6.3.2500'
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace SyntaxVisitors.SugarVisitors
|
|||
ReplaceStatementUsingParent(fe, sl);
|
||||
visit(fn);
|
||||
}
|
||||
else if (fe.in_what is dot_node dn && dn.right is ident id && id.name.ToLower() == "indices")
|
||||
/*else if (fe.in_what is dot_node dn && dn.right is ident id && id.name.ToLower() == "indices")
|
||||
{
|
||||
var typ = fe.type_name;
|
||||
if (typ != null && typ is no_type_foreach)
|
||||
|
|
@ -94,7 +94,7 @@ namespace SyntaxVisitors.SugarVisitors
|
|||
|
||||
ReplaceStatementUsingParent(fe, sl);
|
||||
visit(fn);
|
||||
}
|
||||
}*/
|
||||
else base.visit(fe);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
18
TestSuite/TSource.pas
Normal file
18
TestSuite/TSource.pas
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// #2068
|
||||
type
|
||||
t1<T> = class
|
||||
procedure p1<T2>(f: Action<T>); begin end;
|
||||
end;
|
||||
|
||||
procedure proc2<TSource>;
|
||||
begin
|
||||
var o := new t1<TSource>;
|
||||
o.p1&<string>(b->
|
||||
begin
|
||||
var a: TSource := b;
|
||||
end);
|
||||
end;
|
||||
|
||||
begin
|
||||
Assert(1=1);
|
||||
end.
|
||||
|
|
@ -140,6 +140,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
private bool IsIList(expression_node en)
|
||||
{
|
||||
var ii = en.type.ImplementingInterfaces;
|
||||
if (ii != null)
|
||||
foreach (var itn in ii)
|
||||
{
|
||||
System.Type tt = null;
|
||||
|
|
|
|||
|
|
@ -352,6 +352,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
var semexpr = convert_strong(expr);
|
||||
var Is1DArr = Is1DArray(semexpr);
|
||||
var il = IsIList(semexpr);
|
||||
// Тут может быть другая ситуация - Indices может быть членом semexpr - и тогда нельзя преобразовывать
|
||||
if (!Is1DArr && !il)
|
||||
AddError(get_location(expr), "ONE_DIM_ARRAY_OR_LIST_EXPECTED");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20395,11 +20395,11 @@ namespace PascalABCCompiler.TreeConverter
|
|||
var id = st.lst[2] as SyntaxTree.ident;
|
||||
semantic_check_for_new_range(expr, td, id);
|
||||
}
|
||||
else if (st.typ as System.Type == typeof(SyntaxTree.foreach_stmt) && st.lst.Count == 1) // для a.Indices. Пока непонятно, где описывать тип-маркер
|
||||
/*else if (st.typ as System.Type == typeof(SyntaxTree.foreach_stmt) && st.lst.Count == 1) // для a.Indices. Пока непонятно, где описывать тип-маркер
|
||||
{
|
||||
var expr = st.lst[0] as SyntaxTree.expression;
|
||||
semantic_check_for_indices(expr);
|
||||
}
|
||||
}*/
|
||||
// Patterns
|
||||
else if (st.typ is SemanticCheckType.MatchedExpression) // Это безобразие - SemanticCheckType в TreeHelper.cs помещать!!!
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,4 +34,5 @@ UNNAMED_RECORD_CANNOT_CONTAIN_SEVERAL_VISIBILITY_SECTIONS=Unnamed records can no
|
|||
OPENMP_CONTROLLED_CONSTRUCTIONS_CANNOT_CONTAIN_LAMBDAS=OpenMP-directive-based constructions cannot contain lambdas
|
||||
LAMBDAS_IN_CONSTRUCTOR_PARAMETERS_ARE_FORBIDDEN_IN_THIS_CONTEXT=Lambda-expressions as constructor parameters are forbidden in this context
|
||||
PROCEDURE_TYPE_SHOULD_BE_REPLACED_BY_TYPE_NAME_IN_THIS_CONTEXT=Procedure type should be replaced by type name in this context
|
||||
ACCESS_TO_ENUM_CONST_THROUGH_OBJECT=Enum constant can not be accessed through an object
|
||||
ACCESS_TO_ENUM_CONST_THROUGH_OBJECT=Enum constant can not be accessed through an object
|
||||
ONE_DIM_ARRAY_OR_LIST_EXPECTED=One-dimensional array or list expected
|
||||
|
|
@ -35,4 +35,5 @@ UNNAMED_RECORD_CANNOT_CONTAIN_SEVERAL_VISIBILITY_SECTIONS=Безымянные
|
|||
OPENMP_CONTROLLED_CONSTRUCTIONS_CANNOT_CONTAIN_LAMBDAS=Лямбда-выражения не могут содержаться внутри конструкций под управлением OpenMP-директив
|
||||
LAMBDAS_IN_CONSTRUCTOR_PARAMETERS_ARE_FORBIDDEN_IN_THIS_CONTEXT=Лямбда-выражения как параметры конструктора запрещены в этом контексте
|
||||
PROCEDURE_TYPE_SHOULD_BE_REPLACED_BY_TYPE_NAME_IN_THIS_CONTEXT=Процедурный тип следует заменить именем типа в данном контексте
|
||||
ACCESS_TO_ENUM_CONST_THROUGH_OBJECT=Нельзя обратиться к элементу перечисления через объект
|
||||
ACCESS_TO_ENUM_CONST_THROUGH_OBJECT=Нельзя обратиться к элементу перечисления через объект
|
||||
ONE_DIM_ARRAY_OR_LIST_EXPECTED=Ожидался одномерный массив или список
|
||||
Loading…
Reference in a new issue