Skip to content

Commit 39ead4b

Browse files
committed
Interact with type checker using module names.
1 parent 3c5ff77 commit 39ead4b

File tree

1 file changed

+3
-2
lines changed
  • rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor

1 file changed

+3
-2
lines changed

rascal-lsp/src/main/rascal/lang/rascal/lsp/refactor/Rename.rsc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,11 @@ private bool rascalContainsName(loc l, str name) {
458458
private set[TModel] rascalTModels(set[loc] fs, PathConfig pcfg) {
459459
RascalCompilerConfig ccfg = rascalCompilerConfig(pcfg)[verbose = false]
460460
[logPathConfig = false];
461-
ms = rascalTModelForLocs(toList(fs), ccfg, dummy_compile1);
461+
list[str] moduleNames = [getModuleName(mloc, pcfg) | mloc <- fs];
462+
ms = rascalTModelForNames(moduleNames, ccfg, dummy_compile1);
462463
463464
set[TModel] tmodels = {};
464-
for (modName <- ms.moduleLocs) {
465+
for (str modName <- moduleNames) {
465466
<found, tm, ms> = getTModelForModule(modName, ms);
466467
if (!found) throw unexpectedFailure("Cannot read TModel for module \'<modName>\'\n<toString(ms.messages)>");
467468
tmodels += convertTModel2PhysicalLocs(tm);

0 commit comments

Comments
 (0)