-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove compiletime.Widen #11569
Remove compiletime.Widen #11569
Conversation
val res = | ||
inline erasedValue[T] match | ||
case _: EmptyTuple => EmptyTuple | ||
case _: (t *: ts) => constValue[t] *: constValueTuple[ts] | ||
end match | ||
res.asInstanceOf[Widen[T]] | ||
res.asInstanceOf[T] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that cast actually still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, before inlining the type of res
is Tuple
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these two be implemented in terms of map
, which already deals with casting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that we do not have a tuple on which we could call map
.
This comment has been minimized.
This comment has been minimized.
70dd456
to
859cdd2
Compare
This was a workaround to some limitations of type inference.