aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-11-01 18:26:02 +0100
committerMartin Odersky <odersky@gmail.com>2013-11-01 18:26:02 +0100
commitf920a3186427e9df2fbac97197f2f11331ef4ef3 (patch)
tree62ab9a95f08650901c91a6ae82361886d67b63a4 /src/dotty/tools/dotc/typer/Applications.scala
parent1c17a0f83639ddc4b0fd3ffd294a6a97c887aae3 (diff)
downloaddotty-f920a3186427e9df2fbac97197f2f11331ef4ef3.tar.gz
dotty-f920a3186427e9df2fbac97197f2f11331ef4ef3.tar.bz2
dotty-f920a3186427e9df2fbac97197f2f11331ef4ef3.zip
Changed handling of signatures in TermRefs.
Previously, plain TermRefs had signature NotAMethod. The problem is if the TermRef represents an overloaded term and one of the alternatives is NotAMethod. Then creating the alternative will overwrite (via hash-consing) the overloaded ref. Solution: Introduc new pseudo-signature "UnknownSignature" which is given to plain TermRefs. Also, need to be careful now that all members that denote a specific alternative of a possibly overloaded denotation are referenced by a TermRefWithSig, not a plain TermRef. Previously, implicit members did not follow that, which meant that, what worked, worked only by accident. Still to do: Clean up signatures, termref creation methods. Should TermRef.withDenot automatically set the signature?
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index e2e40e7e2..1d564caee 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -815,8 +815,8 @@ trait Applications extends Compatibility { self: Typer =>
case defn.FunctionType(args, resultType) =>
narrowByTypes(alts, args, resultType)
- case tp =>
- alts filter (alt => testCompatible(normalize(alt), tp))
+ case pt =>
+ alts filter (alt => testCompatible(normalize(alt), pt))
}
if (isDetermined(candidates)) candidates