diff options
author | Martin Odersky <odersky@gmail.com> | 2014-01-14 22:35:48 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-01-14 22:35:48 +0100 |
commit | fcdb8b9f7449096890887b4801359144983d8c4f (patch) | |
tree | a87712fabaeaae22ac0ca3206c8adc818ec72c91 /src/dotty/tools/dotc/typer/Implicits.scala | |
parent | 7e71f3dc5252f4df10cf330eb2ec535338dac992 (diff) | |
download | dotty-fcdb8b9f7449096890887b4801359144983d8c4f.tar.gz dotty-fcdb8b9f7449096890887b4801359144983d8c4f.tar.bz2 dotty-fcdb8b9f7449096890887b4801359144983d8c4f.zip |
Allow ExprType as the type of a view argument.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Implicits.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Implicits.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala index b24c69755..396bf2538 100644 --- a/src/dotty/tools/dotc/typer/Implicits.scala +++ b/src/dotty/tools/dotc/typer/Implicits.scala @@ -318,7 +318,8 @@ trait Implicits { self: Typer => private def implicitProto(resultType: Type) = if (argument.isEmpty) resultType else ViewProto(argument.tpe, resultType) - assert(argument.isEmpty || argument.tpe.isValueType, i"found: ${argument.tpe}, expected: $pt") + assert(argument.isEmpty || argument.tpe.isValueType || argument.tpe.isInstanceOf[ExprType], + i"found: ${argument.tpe}, expected: $pt") /** The expected type for the searched implicit */ lazy val fullProto = implicitProto(pt) |