diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-11-12 12:31:49 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-11-12 12:31:49 +0000 |
commit | 0e4ff57c1c34f237edb0ac8c463ebad0acb4f7d0 (patch) | |
tree | 8a5b12cad8900c7fd7971961b2e2c6a45e2964b7 /src | |
parent | f5a525aaceb9415e4339f7b2aa86f5de4fb1c6b7 (diff) | |
download | scala-0e4ff57c1c34f237edb0ac8c463ebad0acb4f7d0.tar.gz scala-0e4ff57c1c34f237edb0ac8c463ebad0acb4f7d0.tar.bz2 scala-0e4ff57c1c34f237edb0ac8c463ebad0acb4f7d0.zip |
fix #2488.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala index f19f5516c0..773b2cf561 100644 --- a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala +++ b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala @@ -388,7 +388,10 @@ trait NamesDefaults { self: Analyzer => } val res = typer.silent(_.typed(arg, subst(paramtpe))) match { case _: TypeError => - positionalAllowed = false + // if the named argument is on the original parameter + // position, positional after named is allowed. + if (index != pos) + positionalAllowed = false argPos(index) = pos rhs case t: Tree => |