File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Scala and the fly likes Did I get this Option implementation wrong? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Scala
Bookmark "Did I get this Option implementation wrong?" Watch "Did I get this Option implementation wrong?" New topic
Author

Did I get this Option implementation wrong?

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

I'm terribly confused with the following piece of code that I wrote.



I do not see any error being shown by IntelliJ. However when I try to test it, it fails with a compilation failure as shown above.


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
    
    2

I figured that out by just simply moving the inner method above the answers.filter(...). I would assume that this is not the problem with Scala but a bug in IntelliJ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Did I get this Option implementation wrong?
 
Similar Threads
Anyone using Scala?
[Grails] Passing user object into hiddenField
Partially applied functions?
Scala exercises for beginners (in FP)
Unfamiliar Scala syntax