Skip to content
Browse files

Fix JSON reflection issue for Scala 2.8.2

  • Loading branch information...
1 parent 9a1be04 commit dff0b6a1baa746cc3e60bd8805f71c4fbea0e290 Joni Freeman committed Dec 19, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 core/json/src/main/scala/net/liftweb/json/ScalaSig.scala
View
8 core/json/src/main/scala/net/liftweb/json/ScalaSig.scala
@@ -83,7 +83,13 @@ private[json] object ScalaSigReader {
case NullaryMethodType(TypeRefType(_, _, args)) => args(typeArgIdx)
}
*/
- val t = s.infoType.asInstanceOf[{ def resultType: Type }].resultType match {
+ def resultType = try {
+ s.infoType.asInstanceOf[{ def resultType: Type }].resultType
+ } catch {
+ case e: java.lang.NoSuchMethodException => s.infoType.asInstanceOf[{ def typeRef: Type }].typeRef
+ }
+
+ val t = resultType match {
case TypeRefType(_, _, args) => args(typeArgIdx)
}

0 comments on commit dff0b6a

Please sign in to comment.
Something went wrong with that request. Please try again.