From ee46ed3b69cbc254deb45a0fe51069d7c5305e00 Mon Sep 17 00:00:00 2001 From: Toine Hartman Date: Wed, 8 Jan 2025 13:49:19 +0100 Subject: [PATCH] Merge pull request #551 from usethesource/fix/rename-refactoring/use-module-names Interact with type checker using module names. (cherry picked from commit 66773d8761f22d78a64d61fc8f6715d8dd2db207) --- .../src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc b/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc index aba8a8c2..eb8a9d26 100644 --- a/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc +++ b/rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc @@ -489,10 +489,11 @@ private bool rascalContainsName(loc l, str name) { private set[TModel] rascalTModels(set[loc] fs, PathConfig pcfg) { RascalCompilerConfig ccfg = rascalCompilerConfig(pcfg)[verbose = false] [logPathConfig = false]; - ms = rascalTModelForLocs(toList(fs), ccfg, dummy_compile1); + list[str] topModuleNames = [getModuleName(mloc, pcfg) | mloc <- fs]; + ms = rascalTModelForNames(topModuleNames, ccfg, dummy_compile1); set[TModel] tmodels = {}; - for (modName <- ms.moduleLocs) { + for (str modName <- ms.moduleLocs) { = getTModelForModule(modName, ms); if (!found) throw unexpectedFailure("Cannot read TModel for module \'\'\n"); tmodels += convertTModel2PhysicalLocs(tm);