-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #7868: Normalize type parameter in ValueOf #7905
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
Conversation
|
||
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] = { |
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.
I had to change the test case slightly to make sure Index
was fully defined before looking for ValueOf[Index]
.
@@ -861,7 +861,7 @@ trait Implicits { self: Typer => | |||
|
|||
formal.argTypes match { | |||
case arg :: Nil => | |||
fullyDefinedType(arg.dealias, "ValueOf argument", span) match { | |||
fullyDefinedType(arg.dealias, "ValueOf argument", span).normalized match { |
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.
Not sure if it should be instead
fullyDefinedType(arg.dealias.normalized, "ValueOf argument", span)
// or
fullyDefinedType(arg.normalized.dealias, "ValueOf argument", span)
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.
I think it's most general this way.
@@ -861,7 +861,7 @@ trait Implicits { self: Typer => | |||
|
|||
formal.argTypes match { | |||
case arg :: Nil => | |||
fullyDefinedType(arg.dealias, "ValueOf argument", span) match { | |||
fullyDefinedType(arg.dealias, "ValueOf argument", span).normalized match { |
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.
I think it's most general this way.
No description provided.