Meaningless Drivel is fun!*
The moose likes Scala and the fly likes Scala Manifest for Type error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Scala
Bookmark "Scala Manifest for Type error" Watch "Scala Manifest for Type error" New topic

Scala Manifest for Type error

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345

A simple Scala method as mentioned below:

When compiled, gives me the error as below:

Any clues? This is the strangest error that I have ever faced.

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345

Got this solved! Here is a reference to what needs to be done. Just add an implicit parameter!
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

Or a context bound. A context bound looks like this:

It's the same as this:

You read the line with the context bound as: "method asType takes a type parameter A for which there is a Manifest".

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
I agree. Here's the link:
subject: Scala Manifest for Type error
Similar Threads
Which is better Groovy or Scala?
How to generate XML from MAP
global varible gives ClassCastException
"Scala Programming": Java frameworks and Scala
cannot connect to my MySQL db using HttpClient