We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bcdc34 commit a268557Copy full SHA for a268557
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -4011,7 +4011,7 @@ object Types {
4011
case tycon: TypeRef if tycon.symbol.isOpaqueAlias =>
4012
tycon.translucentSuperType.applyIfParameterized(args)
4013
case _ =>
4014
- superType
+ tryNormalize.orElse(superType)
4015
}
4016
4017
inline def map(inline op: Type => Type)(using Context) =
tests/pos/i8666.scala
@@ -0,0 +1,10 @@
1
+class Foo[A, B]()
2
+
3
+type FooSnd[X] = X match
4
+ case Foo[_, b] => b
5
6
+trait Bar[A]:
7
+ def bar(h: FooSnd[A]): Int
8
9
+val foo: Bar[Foo[String, Int]] = new Bar[Foo[String, Int]]:
10
+ def bar(h: FooSnd[Foo[String, Int]]) = h
0 commit comments