fix key search order

This commit is contained in:
Mark Harrah 2011-05-29 19:17:31 -04:00
parent 349b510c93
commit f7d2ff713b
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ object Act
val confMap = confs map { conf => (conf, index.keys(proj, conf)) } toMap;
val allKeys = (Set.empty[String] /: confMap.values)(_ ++ _)
token(ID !!! "Expected key" examples allKeys).flatMap { keyString =>
val conf = confMap.flatMap { case (key, value) => if(value contains keyString) key :: Nil else Nil } headOption;
val conf = confs.flatMap { conf => if(confMap(conf) contains keyString) conf :: Nil else Nil } headOption;
getKey(keyMap, keyString, k => (k, conf flatMap idFun))
}
}