Skip to content

Conversation

nicolasstucki
Copy link
Contributor

Detect when a a reference to a constructor is a static path.
Also fix isTerm and isType on Hole. We do not pickle this extra
info as when we unpickle it we already know if it will be a type or a term.

Detect when a a reference to a constructor is a static path.
Also fix `isTerm` and `isType` on `Hole`. We do not pickle this extra
info as when we unpickle it we already know if it will be a type or a term.
@biboudis

This comment has been minimized.

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -157,6 +157,8 @@ class ReifyQuotes extends MacroTransform {
val tagDef = tagDefCache.getOrElseUpdate(prefix.symbol, mkTagSymbolAndAssignType(prefix))
tagDef.symbol.typeRef
}
case AnnotatedType(parent, _) =>
apply(parent) // Only keep the Annotated tree
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mean it throws the annotation away? That will make it impossible to keep some annotations in types.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We throw away the annotation on the type but then recover it from the Annotated type tree while unpickling.
Maybe I should only do it if it contains a splice. In that case we would always have the tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants