aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Inferencing.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-03 15:28:51 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-03 15:28:51 +0100
commit2023b940f0ec91705d9fd8017fa08d59aa11ac99 (patch)
treefa099bb13e7174c5fbe906fab50ba6ca6aacd30f /src/dotty/tools/dotc/typer/Inferencing.scala
parentc81a21a8ecc690813bbe4eaece0640f262434f84 (diff)
downloaddotty-2023b940f0ec91705d9fd8017fa08d59aa11ac99.tar.gz
dotty-2023b940f0ec91705d9fd8017fa08d59aa11ac99.tar.bz2
dotty-2023b940f0ec91705d9fd8017fa08d59aa11ac99.zip
Making namedPartsWith more robust.
When called from implicitScope, we formed an AndType with a WildcardType. No problem, except that this broke the AndType assertion. The assertion is not needed for this sepcial case.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Inferencing.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Inferencing.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala
index 76e701fee..b85b7b6ca 100644
--- a/src/dotty/tools/dotc/typer/Inferencing.scala
+++ b/src/dotty/tools/dotc/typer/Inferencing.scala
@@ -140,7 +140,7 @@ object Inferencing {
ctx.typer.isApplicable(tp, argType :: Nil, resultType)
}
override def namedPartsWith(p: NamedType => Boolean)(implicit ctx: Context): collection.Set[NamedType] =
- AndType(argType, resultType).namedPartsWith(p) // this is more efficient than oring two namedParts sets
+ AndType.unchecked(argType, resultType).namedPartsWith(p) // this is more efficient than oring two namedParts sets
override def computeHash = doHash(argType, resultType)
}