What are nested/unnested packages in Scala 2.8?
Posted
by retronym
on Stack Overflow
See other posts from Stack Overflow
or by retronym
Published on 2010-05-13T20:55:37Z
Indexed on
2010/05/14
15:14 UTC
Read the original article
Hit count: 261
In Scala 2.7, I could write:
package com.acme.bar
class Bar
.
package com.acme.foo
class Foo {
new bar.Bar
}
This doesn't compile in Scala 2.8 -- however this does:
package com.acme
package bar
class Bar
.
package com.acme
package foo
class Foo {
new bar.Bar
}
- What was the motivation for this?
- What is the precise meaning, with regards to scope and visibility?
- When should I use one form over the other?
© Stack Overflow or respective owner