summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2009-11-12 12:31:49 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2009-11-12 12:31:49 +0000
commit0e4ff57c1c34f237edb0ac8c463ebad0acb4f7d0 (patch)
tree8a5b12cad8900c7fd7971961b2e2c6a45e2964b7 /src
parentf5a525aaceb9415e4339f7b2aa86f5de4fb1c6b7 (diff)
downloadscala-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.scala5
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 =>