File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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: 9999

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: 9999

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: 15043

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 8 API documentation
I agree. Here's the link:
subject: Scala Manifest for Type error
It's not a secret anymore!