Skip to content

Commit 9d759df

Browse files
committed
Fix #7810: Survive wildcards when summoning a ValueOf
1 parent d45fea0 commit 9d759df

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Implicits.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ trait Implicits { self: Typer =>
855855
(formal, span) => implicit ctx => {
856856
def success(t: Tree) = New(defn.ValueOfClass.typeRef.appliedTo(t.tpe), t :: Nil).withSpan(span)
857857

858-
formal.argTypes match {
858+
formal.argInfos match {
859859
case arg :: Nil =>
860860
fullyDefinedType(arg.dealias, "ValueOf argument", span) match {
861861
case ConstantType(c: Constant) =>

tests/neg/i7810.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
val a = implicitly[ValueOf[_]] // error

0 commit comments

Comments
 (0)