You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes compiler transforms qualified package names into This(). After resetAllAttrs, symbol get lost and there's only an unqualified TypeName left, so the result cannot be typechecked anymore.
The text was updated successfully, but these errors were encountered:
Olivier Chafik (ochafik) said:
For what it's worth, here's a hacky workaround that mostly works (needs to be called on the tree before calling resetAllAttrs):
def expandModuleReferences(u: scala.reflect.api.Universe)(tree: u.Tree): u.Tree = {
import u._
new Transformer {
override def transform(tree: Tree) = tree match {
case Ident() if tree.symbol != null && tree.symbol.isModule && tree.symbol.isStable =>
getModulePath(u)(tree.symbol.asModule)
case _ =>
super.transform(tree)
}
}.transform(tree)
}
Sometimes compiler transforms qualified package names into This(). After resetAllAttrs, symbol get lost and there's only an unqualified TypeName left, so the result cannot be typechecked anymore.
The text was updated successfully, but these errors were encountered: