aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-19 12:32:21 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-19 12:34:36 +0100
commit7151d0fdc960e439aa71ad3e4c69e00153c0f377 (patch)
tree6997517484b8bf1c81057c7c9161827dee20eab0 /src/dotty/tools/dotc/typer/Applications.scala
parent4d3d2d3177157c5b02f5ebc536de1b80aa37ddbb (diff)
downloaddotty-7151d0fdc960e439aa71ad3e4c69e00153c0f377.tar.gz
dotty-7151d0fdc960e439aa71ad3e4c69e00153c0f377.tar.bz2
dotty-7151d0fdc960e439aa71ad3e4c69e00153c0f377.zip
Adapt fun prototype when looking for second chance implicits (aka BigInt)
If we look for aprototype of the form select(name, FunProto(args, ...)) it's important that the result type of the FunProto type is a wildcard type, because implicit views are disabled for that match. --- this commit achieves the first bootstrap of dotty! ---
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 400c43e3c..1ee34e4be 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -448,7 +448,9 @@ trait Applications extends Compatibility { self: Typer =>
// try with prototype `[].name(args)`, this might succeed by inserting an
// implicit conversion around []. (an example is Int + BigInt).
tryEither { implicit ctx =>
- val qual1 = adaptInterpolated(qual, new SelectionProto(name, proto, NoViewsAllowed))
+ val simpleFunProto = new FunProto(tree.args, WildcardType, this) // drop result type, because views are disabled
+ val selProto = new SelectionProto(name, simpleFunProto, NoViewsAllowed)
+ val qual1 = adaptInterpolated(qual, selProto)
if (qual eq qual1) ctx.error("no progress")
if (ctx.reporter.hasErrors) qual1
else