Fix qualified names in tag values (#5978)

close #5901

Changelog:
- fix: qualified names in tag values

# Important Notes
![2023-03-16-190913_892x345_scrot](https://user-images.githubusercontent.com/357683/225684530-0d60a7a0-8b95-40a9-9ff6-2c112d966991.png)
This commit is contained in:
Dmitry Bushev 2023-03-16 20:36:15 +03:00 committed by GitHub
parent 126a466872
commit 69d8864a1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -844,9 +844,11 @@ object BindingsMap {
tpe.toConcrete(moduleMap).map(tpe => this.copy(tpe = tpe))
}
/** @inheritdoc */
override def qualifiedName: QualifiedName =
module.getName.createChild(cons.name)
tpe.qualifiedName.createChild(cons.name)
/** @inheritdoc */
override def module: ModuleReference = tpe.module
}

View File

@ -615,8 +615,8 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
Some(
Seq(
"Number",
"Unnamed.Test.Variant_1",
"Unnamed.Test.Variant_2"
"Unnamed.Test.My_Atom.Variant_1",
"Unnamed.Test.My_Atom.Variant_2"
)
)
)
@ -2220,7 +2220,7 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
false,
false,
None,
Some(List("Unnamed.Test.Mk_A", "Unnamed.Test.Mk_A_Plus"))
Some(List("Unnamed.Test.A.Mk_A", "Unnamed.Test.A.Mk_A_Plus"))
)
),
selfType = "Unnamed.Test.A",
@ -2243,7 +2243,7 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
false,
false,
None,
Some(List("Unnamed.Test.Mk_A", "Unnamed.Test.Mk_A_Plus"))
Some(List("Unnamed.Test.A.Mk_A", "Unnamed.Test.A.Mk_A_Plus"))
)
),
selfType = "Unnamed.Test",
@ -2565,7 +2565,7 @@ class SuggestionBuilderTest extends AnyWordSpecLike with Matchers {
val fooArg = fooSuggestion.get.arguments(1)
fooArg.reprType shouldEqual "Unnamed.Test.My_Tp"
fooArg.tagValues shouldEqual Some(
List("Unnamed.Test.Variant_A", "Unnamed.Test.Variant_B")
List("Unnamed.Test.My_Tp.Variant_A", "Unnamed.Test.My_Tp.Variant_B")
)
}