Aladdin - Scala Bugtracking
[#433] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Vincent Martin fixed 2005-05-26 19:28:19.0
subject type inference makes ExplicitOuter fail
code
  def lookup(): Option[Pair[String, String]] =
    (null: Option[Pair[String, String]]) match {
      case Some(Pair(_, _)) =>
	if (true)
	  Some(Pair(null, null))
	else
	  lookup() match {
	    case Some(_) => Some(null)
	    case None => None
	  }
    };
what happened
Compiler crash (ExplicitOuter).
what expected The error must come from type inference because, as observed by Philippe, the example compiles if we replace
case Some(_) => Some(null)
with
case Some(_) => Some(null): Option[Pair[String, String]]
[back to overview]
Changes of this bug report
Martin  edited on  2006-03-30 14:51:57.0