Why the Change?TopWhat Has ChangedContents

What Has Changed

Previously the single package clause

package org.myproject.tests
...

was equivalent to the two nested clauses

package org.myproject {
  package tests {
    ...
  }
}

and both were equivalent to the three nested clauses below.

package org {
  package myproject {
    package tests {
      ...
    }
  }
}

They all meant the same. In Scala 2.8 this has changed. The difference is that the package clause

package org.myproject.tests

now only brings the members of the org.myproject.tests in scope, but not the members of the two outer packages org.myproject and org. If you want to have the members of both tests and org.myproject in scope you need to use the two nested package clauses above, or else the chained equivalent:

package org.myproject // myproject members are visible, but not org members
package tests         // test members are visible

Next: Why the Change?


Why the Change?TopWhat Has ChangedContents