Skip to content

Fix #1662: Add missing case for singleton #1695

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 1 commit into from
Nov 16, 2016

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Nov 10, 2016

Review by @liufengyun

Have to handle also SkolemTypes there.

Fixes scala#1662.
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.

Otherwise, LGTM.

@@ -343,6 +343,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
def singleton(tp: Type)(implicit ctx: Context): Tree = tp match {
case tp: TermRef => ref(tp)
case tp: ThisType => This(tp.cls)
case tp: SkolemType => singleton(tp.narrow)
case SuperType(qual, _) => singleton(qual)
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought SkolemType is only used for existential types, but it seems not to be the case. Could you briefly explain a little bit the usage of SkolemType, or add a comment to class SkolemType?

RecThis is also a SingletonType, I guess it can be safely ignored here.

@odersky odersky merged commit 6990bb3 into scala:master Nov 16, 2016
@allanrenucci allanrenucci deleted the fix-#1662 branch December 14, 2017 16:59
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.

2 participants