aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 11de19648..840bee467 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -1072,8 +1072,11 @@ class Typer extends Namer with Applications with Implicits {
}
// try an implicit conversion
inferView(tree, pt) match {
- case SearchSuccess(adapted) => adapted
- case failure: SearchFailure => err.typeMismatch(tree, pt, failure)
+ case SearchSuccess(adapted) =>
+ adapted
+ case failure: SearchFailure =>
+ if (pt.isInstanceOf[ProtoType]) tree
+ else err.typeMismatch(tree, pt, failure)
}
}