- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Help fixing "non variable type-argument String in type pattern String => _ is unchecked since it is eliminated by erasure"
Thu, 2012-01-19, 19:56
Hi Everyone,
I'm trying to fix the compilation warning in https://github.com/vspy/scala-mustache but I'm pretty new to Scala, so I still don't quite understand how to use Manifest. I tried reading Daniel's post [1], but still no luck.
These are the lines that give warnings:
non variable type-argument String in type pattern String => _ is unchecked since it is eliminated by erasure
https://github.com/vspy/scala-mustache/blob/master/src/main/scala/Mustac...
non variable type-argument String in type pattern (String, String => String) => _ is unchecked since it is eliminated by erasure
https://github.com/vspy/scala-mustache/blob/master/src/main/scala/Mustac...
non variable type-argument String in type pattern scala.collection.MapLike[String,_,_] is unchecked since it is eliminated by erasure
https://github.com/vspy/scala-mustache/blob/master/src/main/scala/Mustac...
Thanks,
Drew
[1] http://stackoverflow.com/questions/1094173/how-do-i-get-around-type-eras...
The usual way to deal with this is to use Function1[_, _]. You may have to cast it before you use it.
On Thu, Jan 19, 2012 at 12:56 PM, Drew Kutcharian <drew@venarc.com> wrote: