diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-01-13 17:27:01 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-01-13 17:27:01 +0000 |
commit | 541dd58f4d8fec8fc2b385b2c288721e5e258915 (patch) | |
tree | d991df7b89c32c75f5f9bab086b822169753db60 /src/compiler/scala/tools/nsc/typechecker/Implicits.scala | |
parent | 25e7a7c350202f02a80c7747c4329268122b101c (diff) | |
download | scala-541dd58f4d8fec8fc2b385b2c288721e5e258915.tar.gz scala-541dd58f4d8fec8fc2b385b2c288721e5e258915.tar.bz2 scala-541dd58f4d8fec8fc2b385b2c288721e5e258915.zip |
better fix for see #2421 after feedback from Ma...
better fix for see #2421 after feedback from Martin
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Implicits.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index c4464010c1..0539b4ee17 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -477,7 +477,14 @@ self: Analyzer => // #2421b: since type inference (which may have been performed during implicit search) // does not check whether inferred arguments meet the bounds of the corresponding parameter (see note in solvedTypes), // must check again here: - typed1(itree2, EXPRmode, wildPt) + itree2 match { // roughly equivalent to typed1(itree2, EXPRmode, wildPt), + // since typed1 only forces checking of the outer tree and calls typed on the subtrees + // (they have already been type checked, by the typed1(itree...) above, so the subtrees are skipped by typed) + // inlining the essential bit here for clarity + //TODO: verify that these subtrees don't need re-checking + case TypeApply(fun, args) => typedTypeApply(itree2, EXPRmode, fun, args) + case _ => + } val result = new SearchResult(itree2, subst) incCounter(foundImplicits) |