-
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
AssertionError: assertion failed: orphan parameter reference: TypeParamRef(T) - when matching type #15564
Comments
Unrelated to the crash but I would appreciate suggestions how to:
|
A slightly smaller minimization: type Set[T, V <: T]
type Get[S] = S match
case Set[?, v] => v |
Also the problem disappears if you define |
The error is likely in |
Duplicated by #15595, where the minimisation is: trait MatchResult[+T]
@main def Test() = {
def convert[T <: Seq[_], U <: MatchResult[_]](fn: T => U)(implicit x: Seq[_] = Seq.empty): U = ???
def resultOf[T](v: T): MatchResult[T] = ???
convert { _ =>
type R = String
resultOf[R](???)
// this would not lead to crash:
// val x = resultOf[R](???)
// x
}
} which doesn't involve any patterns. (edit: Changed my mind: it's the same result, but possibly distinct enough it's not a duplicate) |
How do we know it's a regression? I am actually not sure this is a duplicate of #15595 after all. |
@mwisnicki Try to convert all your |
Compiler version
3.2.0-RC1
Minimized code
https://scastie.scala-lang.org/DswQvPTZTou8wqLq9zAXDw
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: