Skip to content

Commit

Permalink
Fix type erasure warnings in record.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowfiend committed Apr 13, 2014
1 parent 241dbfa commit 4701691
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -295,10 +295,10 @@ trait TypedField[ThisType] extends BaseField {

/** Generic implementation of setFromAny that implements exactly what the doc for setFromAny specifies, using a Manifest to check types */
protected final def genericSetFromAny(in: Any)(implicit m: Manifest[MyType]): Box[MyType] = in match {
case value if m.erasure.isInstance(value) => setBox(Full(value.asInstanceOf[MyType]))
case Some(value) if m.erasure.isInstance(value) => setBox(Full(value.asInstanceOf[MyType]))
case Full(value) if m.erasure.isInstance(value) => setBox(Full(value.asInstanceOf[MyType]))
case (value)::_ if m.erasure.isInstance(value) => setBox(Full(value.asInstanceOf[MyType]))
case value if m.runtimeClass.isInstance(value) => setBox(Full(value.asInstanceOf[MyType]))
case Some(value) if m.runtimeClass.isInstance(value) => setBox(Full(value.asInstanceOf[MyType]))
case Full(value) if m.runtimeClass.isInstance(value) => setBox(Full(value.asInstanceOf[MyType]))
case (value)::_ if m.runtimeClass.isInstance(value) => setBox(Full(value.asInstanceOf[MyType]))
case (value: String) => setFromString(value)
case Some(value: String) => setFromString(value)
case Full(value: String) => setFromString(value)
Expand Down

0 comments on commit 4701691

Please sign in to comment.