Skip to content

Commit 45e4758

Browse files
committed
Test for rootTreeOrProvider with late compile
1 parent b742053 commit 45e4758

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

language-server/test/dotty/tools/languageserver/RenameTest.scala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,19 @@ class RenameTest {
236236

237237
}
238238

239+
@Test def renameImportFromTasty: Unit = {
240+
// Note that everything here is in the empty package; this ensures that we will
241+
// use the sourcefile loader to load `class Bar`.
242+
def testRename(m: CodeMarker) = {
243+
withSources(
244+
code"""object O { class ${m1}Foo${m2} }""",
245+
tasty"""import O.${m3}Foo${m4}
246+
class Bar extends ${m5}Foo${m6}"""
247+
).rename(m, "NewName", Set(m1 to m2, m3 to m4, m5 to m6))
248+
}
239249

250+
testRename(m1)
251+
testRename(m2)
252+
}
240253

241254
}

0 commit comments

Comments
 (0)