diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-14 15:01:00 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-15 15:08:22 +0200 |
commit | 62531258003dba513a21847d58395823d6840363 (patch) | |
tree | 0fcc8a0ab980fa92a2efc79ddb996d30e6ae2d77 /src/dotty/tools/dotc/ast/tpd.scala | |
parent | 409c6c30c8496529aace68967acccf88850145da (diff) | |
download | dotty-62531258003dba513a21847d58395823d6840363.tar.gz dotty-62531258003dba513a21847d58395823d6840363.tar.bz2 dotty-62531258003dba513a21847d58395823d6840363.zip |
Changes to overloading
Fix #1381: Overloading is now changed so that we first try without implicit searches.
Only if that leaves no applicable alternatives we try again with implicit search turned on.
This also fixes test case t2660, which got moved from neg to pos.
Diffstat (limited to 'src/dotty/tools/dotc/ast/tpd.scala')
-rw-r--r-- | src/dotty/tools/dotc/ast/tpd.scala | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/ast/tpd.scala b/src/dotty/tools/dotc/ast/tpd.scala index 4593b9554..2b0e63a19 100644 --- a/src/dotty/tools/dotc/ast/tpd.scala +++ b/src/dotty/tools/dotc/ast/tpd.scala @@ -854,8 +854,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { var allAlts = denot.alternatives .map(_.termRef).filter(tr => typeParamCount(tr) == targs.length) if (targs.isEmpty) allAlts = allAlts.filterNot(_.widen.isInstanceOf[PolyType]) - val alternatives = - ctx.typer.resolveOverloaded(allAlts, proto, Nil) + val alternatives = ctx.typer.resolveOverloaded(allAlts, proto) assert(alternatives.size == 1, i"${if (alternatives.isEmpty) "no" else "multiple"} overloads available for " + i"$method on ${receiver.tpe.widenDealias} with targs: $targs%, %; args: $args%, % of types ${args.tpes}%, %; expectedType: $expectedType." + |