Aladdin - Scala Bugtracking
[#713] project: compiler priority: low category: bug
submitter assigned to status date submitted
Sean _ _ 2006-08-28 13:35:13.0
subject AllRef not compatible with compound types?
code
trait Test {
  type Node <: NodeImpl;
  trait NodeImpl;
  trait IfImpl extends NodeImpl;
  def foo0 : Node = null;
  def foo1 : IfImpl = null;
  def foo2 : Node with IfImpl = null;
}
what happened
type mismatch;
found   : scala.AllRef(null)
required: Test.this.Node with Test.this.IfImpl	
what expected I think it should type check, but not sure. null.asInstanceOf[Node with IfImpl] will work.
[back to overview]
Changes of this bug report