diff options
author | Martin Odersky <odersky@gmail.com> | 2006-06-17 21:08:53 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-06-17 21:08:53 +0000 |
commit | 77b063b003a58a7d88bf0c49e5fdb718acfb157f (patch) | |
tree | e4a1ebbcd8523dfa57671615df5029bbc2d4a6e4 /src | |
parent | 28c125d3b9466148db9e593cf965f58c24f9b43c (diff) | |
download | scala-77b063b003a58a7d88bf0c49e5fdb718acfb157f.tar.gz scala-77b063b003a58a7d88bf0c49e5fdb718acfb157f.tar.bz2 scala-77b063b003a58a7d88bf0c49e5fdb718acfb157f.zip |
Fixed type class problem reported by Bruno Oliv...
Fixed type class problem reported by Bruno Oliveira
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 4f5eab5756..82af6dbaad 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -371,14 +371,12 @@ trait Typers requires Analyzer { context.undetparams = context.undetparams ::: tparams1 adapt(tree1 setType restpe.substSym(tparams, tparams1), mode, pt) case mt: ImplicitMethodType if ((mode & (EXPRmode | FUNmode | LHSmode)) == EXPRmode) => // (4.1) - val tree1 = - if (!context.undetparams.isEmpty & (mode & POLYmode) == 0) { // (9) - val tparams = context.undetparams - context.undetparams = List() - inferExprInstance(tree, tparams, pt) - adapt(tree, mode, pt) - } else tree - typed(applyImplicitArgs(tree1), mode, pt) + if (!context.undetparams.isEmpty & (mode & POLYmode) == 0) { // (9) + val tparams = context.undetparams + context.undetparams = List() + inferExprInstance(tree, tparams, pt) + adapt(tree, mode, pt) + } else typed(applyImplicitArgs(tree), mode, pt) case mt: MethodType if (((mode & (EXPRmode | FUNmode | LHSmode)) == EXPRmode) && (context.undetparams.isEmpty || (mode & POLYmode) != 0)) => |