Skip to content

Commit 95fd743

Browse files
KacperFKorbantanishiking
authored andcommitted
Deterministic synthetic itids
1 parent 48bfc8e commit 95fd743

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/InkuireSupport.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ trait InkuireSupport:
7070
extension (tpe: TypeRepr)
7171
def asInkuire(vars: Set[String]): Inkuire.TypeLike = inner(tpe, vars)
7272

73-
private def genSyntheticTypeArgs(n: Int) =
73+
private def genSyntheticTypeArgs(n: Int, resSymbol: Symbol) =
7474
1.to(n).map { i =>
75-
val uuid = s"synthetic-arg$i${Random.nextString(10)}"
75+
val uuid = s"synthetic-arg$i${resSymbol.hashCode}"
7676
val name = s"X$i"
7777
Inkuire.Type(
7878
name = Inkuire.TypeName(name),
@@ -85,7 +85,7 @@ trait InkuireSupport:
8585
//TODO [Inkuire] Type bounds (other than just HKTs)
8686
val name = argument.symbol.normalizedName
8787
val normalizedName = if name.matches("_\\$\\d*") then "_" else name
88-
val params = genSyntheticTypeArgs(typeVariableDeclarationParamsNo(argument))
88+
val params = genSyntheticTypeArgs(typeVariableDeclarationParamsNo(argument), argument.symbol)
8989
val res = Inkuire.Type(
9090
name = Inkuire.TypeName(normalizedName),
9191
itid = argument.symbol.itid,

0 commit comments

Comments
 (0)