From 26b9177494691329f018c60bf1e7adcd99f1aeba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=96stlund?= Date: Thu, 27 Apr 2023 16:13:47 +0200 Subject: [PATCH] Fix return value of qualifyPath() (#10625) - Return a TypeName from qualifyPath() like it's declared to do. --- OMCompiler/Compiler/Script/CevalScriptBackend.mo | 2 +- testsuite/openmodelica/instance-API/QualifyPath1.mos | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OMCompiler/Compiler/Script/CevalScriptBackend.mo b/OMCompiler/Compiler/Script/CevalScriptBackend.mo index 869e46c19e7..81658bb35c1 100644 --- a/OMCompiler/Compiler/Script/CevalScriptBackend.mo +++ b/OMCompiler/Compiler/Script/CevalScriptBackend.mo @@ -3112,7 +3112,7 @@ algorithm then Values.BOOL(SymbolTable.restoreAST(n)); case ("qualifyPath", {Values.CODE(Absyn.C_TYPENAME(classpath)), Values.CODE(Absyn.C_TYPENAME(path))}) - then Values.STRING(AbsynUtil.pathString(NFApi.mkFullyQual(SymbolTable.getAbsyn(), classpath, path))); + then ValuesUtil.makeCodeTypeName(NFApi.mkFullyQual(SymbolTable.getAbsyn(), classpath, path)); end matchcontinue; end cevalInteractiveFunctions4; diff --git a/testsuite/openmodelica/instance-API/QualifyPath1.mos b/testsuite/openmodelica/instance-API/QualifyPath1.mos index 1515ca005cb..74a980f637a 100644 --- a/testsuite/openmodelica/instance-API/QualifyPath1.mos +++ b/testsuite/openmodelica/instance-API/QualifyPath1.mos @@ -21,6 +21,6 @@ getErrorString(); // Result: // true -// "P.A" +// P.A // "" // endResult