summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-11-23 12:51:56 +0000
committerPaul Phillips <paulp@improving.org>2009-11-23 12:51:56 +0000
commit27bc36b7a951301bd901cf5c9b152bdc6a187890 (patch)
tree4c984d8e13c6457832dfd6396496b33783499893 /src/library
parente8e504c0f27d3d594625c9101e5f4fab9b38865e (diff)
downloadscala-27bc36b7a951301bd901cf5c9b152bdc6a187890.tar.gz
scala-27bc36b7a951301bd901cf5c9b152bdc6a187890.tar.bz2
scala-27bc36b7a951301bd901cf5c9b152bdc6a187890.zip
A couple more warning fixes I meant to check in...
A couple more warning fixes I meant to check in with r19758.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/util/parsing/combinator/PackratParsers.scala4
-rw-r--r--src/library/scala/util/parsing/json/Lexer.scala2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/library/scala/util/parsing/combinator/PackratParsers.scala b/src/library/scala/util/parsing/combinator/PackratParsers.scala
index fc8200a390..051fb056fb 100644
--- a/src/library/scala/util/parsing/combinator/PackratParsers.scala
+++ b/src/library/scala/util/parsing/combinator/PackratParsers.scala
@@ -289,7 +289,7 @@ to update each parser involved in the recursion.
//all setupLR does is change the heads of the recursions, so the seed will stay the same
recDetect match {case LR(seed, _, _) => seed.asInstanceOf[ParseResult[T]]}
}
- case MemoEntry(Right(res: ParseResult[T])) => res
+ case MemoEntry(Right(res: ParseResult[_])) => res.asInstanceOf[ParseResult[T]]
}
}
}
@@ -316,7 +316,7 @@ to update each parser involved in the recursion.
//we're done with growing, we can remove data from recursion head
rest.recursionHeads -= rest.pos
rest.getFromCache(p).get match {
- case MemoEntry(Right(x: ParseResult[T])) => x
+ case MemoEntry(Right(x: ParseResult[_])) => x.asInstanceOf[ParseResult[T]]
case _ => throw new Exception("impossible match")
}
}
diff --git a/src/library/scala/util/parsing/json/Lexer.scala b/src/library/scala/util/parsing/json/Lexer.scala
index 9026f45f11..73e58f189e 100644
--- a/src/library/scala/util/parsing/json/Lexer.scala
+++ b/src/library/scala/util/parsing/json/Lexer.scala
@@ -83,7 +83,7 @@ class Lexer extends StdLexical with ImplicitConversions {
private def unicodeBlock = hexDigit ~ hexDigit ~ hexDigit ~ hexDigit ^^ {
case a ~ b ~ c ~ d =>
- new String(io.UTF8Codec.encode(Integer.parseInt(List(a, b, c, d) mkString "", 16)), "UTF-8")
+ new String(Array(Integer.parseInt(List(a, b, c, d) mkString "", 16)), 0, 1)
}
//private def lift[T](f: String => T)(xs: List[Any]): T = f(xs mkString "")