Skip to content

Commit c79a2ce

Browse files
committed
Add test
1 parent 1d1a28d commit c79a2ce

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,16 @@ class DefinitionTest {
125125
.definition(m9 to m10, List(m3 to m4))
126126
}
127127

128+
@Test def goToDefinitionImport: Unit = {
129+
withSources(
130+
code"""package a
131+
class ${m1}Foo${m2}""",
132+
code"""package b
133+
import a.${m3}Foo${m4}
134+
class C extends ${m5}Foo${m6}"""
135+
).definition(m1 to m2, List(m1 to m2))
136+
.definition(m3 to m4, List(m1 to m2))
137+
.definition(m5 to m6, List(m1 to m2))
138+
}
139+
128140
}

0 commit comments

Comments
 (0)