Skip to content

Commit 17b62df

Browse files
Merge pull request #12240 from dotty-staging/fix-wildcard-sig
Fix signatures involving WildcardTypes
2 parents bb5e140 + 2a41413 commit 17b62df

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

compiler/src/dotty/tools/dotc/core/TypeErasure.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,10 +821,10 @@ class TypeErasure(sourceLanguage: SourceLanguage, semiEraseVCs: Boolean, isConst
821821
sigName(this(tp))
822822
case tp: TypeProxy =>
823823
sigName(tp.underlying)
824-
case _: ErrorType | WildcardType | NoType =>
825-
tpnme.WILDCARD
826824
case tp: WildcardType =>
827-
sigName(tp.optBounds)
825+
tpnme.Uninstantiated
826+
case _: ErrorType | NoType =>
827+
tpnme.ERROR
828828
case _ =>
829829
val erasedTp = this(tp)
830830
assert(erasedTp ne tp, tp)

tests/pos/i11481.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
case class Foo[F[_]](f: {def f(x: F[Int]): Object})
2+
case class Bar[F[_], G[_]](f: [B] => F[B] => G[B])

0 commit comments

Comments
 (0)