type mismatch when using type parameter in continuation

the problem just like :
rest{ func[String,String](x=>{shift { };"done"}) }

def of func is
func[T,R](para: T=>R):R ={...}

when compiling ,it reports:
error: Type mismatch;
found: java.lang.String @scala.util.continuations.cpsSynth
@scala.util.continuations.cpsParam[Unit,Unit]
required: String

How to solve it?

Copyright © 2013 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland