What are nested/unnested package 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/13
21:44 UTC
Read the original article
Hit count: 227
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