[#873] | project: compiler | priority: high | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Burak | Martin | fixed | 2007-01-05 18:54:41.0 | |
subject | 1st year 2007 bug: lub and subtype not in sync | |||
code |
abstract class Foo { val x:Option[List[String]] val y:List[Int] (0:Any) match { case 1 => x case 2 => y } } |
|||
what happened | lamppc31:/localhome/buraq/svn/scala> ./build/quick/bin/scalac -d /tmp /tmp/broken.scala failed with type mismatch; found : scala.List[scala.Int] required: scala.Iterable[scala.Any]{<none>; <none>; <none>; <none>} on: temp0.==(2).&&({ exit(Foo.this.y()); true }) |
|||
what expected | silent compile. priority is high, because lub seems pretty important! This is what broke the build earlier today, synthetic methods generated matching code similar to the above. I include the debugging output, just for fun. lub of List(scala.Option[scala.List[java.lang.String]],scala.List[scala.dbc.statement.Expression]) is scala.Iterable[scala.ScalaObject]{<none>; <none>; <none>; <none>} src/dbc/scala/dbc/statement/InsertionData.scala:28 error: type mismatch; found : scala.Option[scala.List[java.lang.String]] required: scala.Iterable[scala.ScalaObject]{<none>; <none>; <none>; <none>} case class Constructor ( |
|||
[back to overview] |
Burak edited on 2007-01-05 18:55:56.0 |
renamed the subject. the trouble is maybe not lub, but that lub and the subtype relation do not agree. |
Martin edited on 2007-01-05 19:27:21.0 |
Should be fixed now. |