Closed kubukoz closed 1 month ago
I thought this was a case of CollisionAvoidance
ignoring AltValueTN
, but it's not. This is actually a bit more convoluted.
The problem starts in UnRef
:
So the problem is a result of a couple things:
.class
(.
and the union's name) in the translation to IR, which ends up in the Ref
Ref
's namespace never gets escaped in CollisionAvoidance
, but package names get escaped in the rendering phase if we have a NameRef
to render (rawPkg.map(CollisionAvoidance.protectKeyword(_))
). Thing is, Ref
s get rendered with show
which just concatenates the namespace with a dot and the name.I have a draft coming.
ok, I also discovered that using traits/defaults (typed nodes in general) from packages with keywords wouldn't go through collision avoidance. This will also be fixed in the PR.
Similar to #1592.
This doesn't happen with normal unions.