Skip to content

Fix #7519: Check PCP of constructor calls on the type #7531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 12, 2019

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.

3 participants