From 286d0ebef72744fa80eac67e7c7ecff2134339b5 Mon Sep 17 00:00:00 2001 From: Ivan Bondarev Date: Thu, 7 Jan 2021 18:56:39 +0100 Subject: [PATCH] fix #2390 --- TreeConverter/TreeConversion/syntax_tree_visitor.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index d129458bc..7280e4cb1 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -7415,6 +7415,8 @@ namespace PascalABCCompiler.TreeConverter } catch (Exception e) { + if (e is CompilationErrorWithLocation && (e as CompilationErrorWithLocation).loc == null) + (e as CompilationErrorWithLocation).loc = mcloc; if (silExt.Count == 0) throw; // не проверять в методах расширения, поскольку их нет }