• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scala Manifest for Type error

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15441
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic