Skip to content

Conversation

@nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki marked this pull request as ready for review January 6, 2020 17:25

def upCast[A, B](a: A)(given erased evidence: (A <:< B)): B = a.asInstanceOf[B]

def from[Set, Value, Index <: Int](value: Value)(given erased at: At[Set, Value, Index]): (given ValueOf[Index]) => Coproduct[Set, Value, Index] = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to change the test case slightly to make sure Index was fully defined before looking for ValueOf[Index].

@nicolasstucki nicolasstucki requested a review from odersky January 6, 2020 17:29
formal.argTypes match {
case arg :: Nil =>
fullyDefinedType(arg.dealias, "ValueOf argument", span) match {
fullyDefinedType(arg.dealias, "ValueOf argument", span).normalized match {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if it should be instead

fullyDefinedType(arg.dealias.normalized, "ValueOf argument", span)
// or
fullyDefinedType(arg.normalized.dealias, "ValueOf argument", span)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's most general this way.

formal.argTypes match {
case arg :: Nil =>
fullyDefinedType(arg.dealias, "ValueOf argument", span) match {
fullyDefinedType(arg.dealias, "ValueOf argument", span).normalized match {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's most general this way.

@odersky odersky merged commit 0254b1b into scala:master Jan 7, 2020
@odersky odersky deleted the fix-#7868 branch January 7, 2020 12:20
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