aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-02-03 22:36:13 +0100
committerMartin Odersky <odersky@gmail.com>2014-02-03 22:36:13 +0100
commit3aa2eb08cb9b4b3d6df35fc6e2e39787111067a1 (patch)
tree88a2558618d7a0dc70dfe762fb75eaba8c8f8dd0 /src/dotty/tools/dotc/typer/Typer.scala
parent79c4490a823f779251f4f2b4a332e639e6ad00d6 (diff)
downloaddotty-3aa2eb08cb9b4b3d6df35fc6e2e39787111067a1.tar.gz
dotty-3aa2eb08cb9b4b3d6df35fc6e2e39787111067a1.tar.bz2
dotty-3aa2eb08cb9b4b3d6df35fc6e2e39787111067a1.zip
Fine-tuning contexts for resolve overloading
When resolving overloading with a fun proto type, we need to evaluate the arguments in the current context, not in an exploring context. Reason: The argument types might contain type valiables that are constrained in the context and that needs to be maintained.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index a814aa469..f48dfa09b 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -1150,7 +1150,7 @@ class Typer extends Namer with Applications with Implicits {
val alts = altDenots map (alt =>
TermRef.withSig(ref.prefix, ref.name, alt.info.signature, alt))
def expectedStr = err.expectedTypeStr(pt)
- resolveOverloaded(alts, pt)(ctx.fresh.withExploreTyperState) match {
+ resolveOverloaded(alts, pt) match {
case alt :: Nil =>
adapt(tree.withType(alt), pt)
case Nil =>