fix #1582
This commit is contained in:
parent
1dbf625c33
commit
288e9e8751
|
|
@ -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 = "1895";
|
||||
public const string Revision = "1896";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%COREVERSION%=2
|
||||
%REVISION%=1895
|
||||
%MINOR%=4
|
||||
%REVISION%=1896
|
||||
%COREVERSION%=2
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.4.2.1895'
|
||||
!define VERSION '3.4.2.1896'
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ using PascalABCCompiler.SyntaxTree;
|
|||
|
||||
namespace SyntaxVisitors
|
||||
{
|
||||
// Визитор, заменяющий цикл while на низкоуровневый код из if и goto
|
||||
// Это - учебный визитор, служит отправной точкой при изучении визиторов изменения синтаксического дерева
|
||||
public class ChangeWhileVisitor : BaseChangeVisitor
|
||||
{
|
||||
int lbnum = 0;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ using System.Text;
|
|||
|
||||
namespace PascalABCCompiler.SyntaxTree
|
||||
{
|
||||
// Визитор накопления легковесной синтаксической таблицы символов.
|
||||
// Не дописан. Имеет большой потенциал применения
|
||||
public partial class CollectLightSymInfoVisitor : BaseEnterExitVisitor
|
||||
{
|
||||
public ScopeSyntax Root;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ using PascalABCCompiler.SyntaxTree;
|
|||
|
||||
namespace SyntaxVisitors
|
||||
{
|
||||
public class CalcConstExprs : BaseChangeVisitor // вычисление целых и вещественных константных выражений на этапе парсинга
|
||||
// Учебный визитор.
|
||||
// Вычисление целых и вещественных константных выражений на этапе парсинга
|
||||
public class CalcConstExprs : BaseChangeVisitor
|
||||
{
|
||||
public override void Exit(syntax_tree_node st)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using PascalABCCompiler.SyntaxTree;
|
|||
|
||||
namespace SyntaxVisitors
|
||||
{
|
||||
// Учебный визитор подсчёта узлов каждого типа
|
||||
public class CountNodesVisitor : BaseEnterExitVisitor
|
||||
{
|
||||
public Dictionary<System.Type, int> d = new Dictionary<System.Type, int>();
|
||||
|
|
|
|||
4
TestSuite/actionArr.pas
Normal file
4
TestSuite/actionArr.pas
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
begin
|
||||
var aa := new Action0[1];
|
||||
Assert(aa[0] = nil);
|
||||
end.
|
||||
|
|
@ -18280,7 +18280,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
type_node tn = ret.visit(_new_expr.type);
|
||||
//if (tn == SystemLibrary.SystemLibrary.void_type)
|
||||
// AddError(new VoidNotValid(get_location(_new_expr.type)));
|
||||
if (tn.IsDelegate)
|
||||
if (tn.IsDelegate && !_new_expr.new_array)
|
||||
AddError(get_location(_new_expr), "CONSTRUCTOR_CALL_FOR_DELEGATE_TYPES_IS_FORBIDDEN");
|
||||
check_for_type_allowed(tn,get_location(_new_expr.type));
|
||||
location loc = get_location(_new_expr);
|
||||
|
|
|
|||
Loading…
Reference in a new issue