Created
June 12, 2009 09:07
-
-
Save slyphon/128530 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object MyEnum extends Enumeration { | |
val One = Value("one") | |
val Two = Value("two") | |
} | |
class Blah { | |
import MyEnum._ | |
def doStuff():Option[MyEnum.Value] = { | |
shouldReturnAnOption.getOrElse(None) | |
} | |
def shouldReturnAnOption:Option[MyEnum.Value] = None | |
} | |
/*********** | |
WTF.scala:11: error: type mismatch; | |
found : ScalaObject | |
required: Option[MyEnum.Value] | |
shouldReturnAnOption.getOrElse(None) | |
^ | |
one error found | |
*************/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment