Aladdin - Scala Bugtracking
[#880] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2007-01-08 23:08:50.0
subject [contrib #287] Object shadowing a type?
code
import scala.xml.Null

class Test[A >: Null]
{
    val x : A = null
}
what happened
Importing the Null object causes the Null type to magically disappear:

/home/jwebb/tests/test.scala:3 error: not found: type Null
class Test[A >: Null]
                ^
/home/jwebb/tests/test.scala:5 error: type mismatch;
 found   : scala.Null(null)
 required: A
        val x : A = null
                    ^
two errors found
what expected Silent compile.
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-01-08 23:09:17.0
contribution #287
Martin  edited on  2007-01-09 15:18:15.0