We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
object Test { def main(args: Array[String]) { println(classOf[Foo[_]].getTypeParameters.apply(0).getBounds) } } class C1 { def c1 = 0 } trait T1 { def t1: Int } trait T2 { def t2: Int } class Foo[T <: (C1 with T1) with T2]// Note the parentheses
Prints: class C1, interface T2
class C1, interface T2
Could we include T1 in the signature, too?
T1
Discovered during porting of our implementation to dotty: scala/scala3#3234 (comment)
Fix is probably as simple as adding a recursive case to:
private def hiBounds(bounds: TypeBounds): List[Type] = bounds.hi.dealiasWiden match { case RefinedType(parents, _) => parents map (_.dealiasWiden) case tp => tp :: Nil }
(Or using the existing flattening in RefinedType.normalize)
RefinedType.normalize
We need to be careful when changing this that we maintain the invariant that the erased type conforms to the generic type.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Prints:
class C1, interface T2
Could we include
T1
in the signature, too?Discovered during porting of our implementation to dotty: scala/scala3#3234 (comment)
Fix is probably as simple as adding a recursive case to:
(Or using the existing flattening in
RefinedType.normalize
)We need to be careful when changing this that we maintain the invariant that the erased type conforms to the generic type.
The text was updated successfully, but these errors were encountered: