From 4f2da33fb29183106c323560123f7fb11e462c18 Mon Sep 17 00:00:00 2001 From: Ivan Bondarev Date: Thu, 7 Jan 2021 21:41:04 +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 7280e4cb1..e9dec3ea0 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -17700,6 +17700,8 @@ namespace PascalABCCompiler.TreeConverter } catch (Errors.Error ex) { + if (ex is CompilationErrorWithLocation && (ex as CompilationErrorWithLocation).loc == null) + (ex as CompilationErrorWithLocation).loc = get_location(syntax_statement); if (ThrowCompilationError || ex is MemberIsNotDeclaredInType || ex is UndefinedNameReference)//TODO: add interface throw ex; else