aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Implicits.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-01-27 15:13:23 +0100
committerMartin Odersky <odersky@gmail.com>2015-01-27 15:13:23 +0100
commita4937916037f74b414c9bab1819681ed2ecd7fdc (patch)
tree71cf57f98ad8a49096711614fa6ec2c858f8d614 /src/dotty/tools/dotc/typer/Implicits.scala
parenteb4d80891bcfaf9ffa402ea36f1562c5f597e479 (diff)
downloaddotty-a4937916037f74b414c9bab1819681ed2ecd7fdc.tar.gz
dotty-a4937916037f74b414c9bab1819681ed2ecd7fdc.tar.bz2
dotty-a4937916037f74b414c9bab1819681ed2ecd7fdc.zip
Fixups taking into account reviewer's comments.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Implicits.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Implicits.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala
index 24d9ebf6d..5111f10bd 100644
--- a/src/dotty/tools/dotc/typer/Implicits.scala
+++ b/src/dotty/tools/dotc/typer/Implicits.scala
@@ -450,10 +450,8 @@ trait Implicits { self: Typer =>
private def nestedContext = ctx.fresh.setMode(ctx.mode &~ Mode.ImplicitsEnabled)
private def implicitProto(resultType: Type, f: Type => Type) =
- if (argument.isEmpty) f(resultType) else ViewProto(f(argument.tpe/*.widen*/), f(resultType))
- // !!! TODO: check performance implications
- // If we do the widen, SyntheticMethods, line 66 fails to compile
- // val synthetic = sym.copy(...)
+ if (argument.isEmpty) f(resultType) else ViewProto(f(argument.tpe.widen), f(resultType))
+ // Not clear whether we need to drop the `.widen` here. All tests pass with it in place, though.
assert(argument.isEmpty || argument.tpe.isValueType || argument.tpe.isInstanceOf[ExprType],
d"found: ${argument.tpe}, expected: $pt")