aspose file tools*
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
JavaRanch » Java Forums » Languages » Scala
Bookmark "Scala Manifest for Type error" Watch "Scala Manifest for Type error" New topic
Author

Scala Manifest for Type error

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9427
    
    2

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: 9427
    
    2

Got this solved! Here is a reference to what needs to be done. Just add an implicit parameter!

http://www.scala-lang.org/api/2.10.3/index.html#scala.reflect.Manifest
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14274
    
  21

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: http://aspose.com/file-tools
 
subject: Scala Manifest for Type error