Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ object SymDenotations {
|| is(Inline, butNot = Deferred)
|| is(JavaDefinedVal, butNot = Method)
|| isConstructor
|| !owner.isExtensibleClass
|| exists && !owner.isExtensibleClass

/** A class is effectively sealed if has the `final` or `sealed` modifier, or it
* is defined in Scala 3 and is neither abstract nor open.
Expand Down
6 changes: 6 additions & 0 deletions tests/neg/i23637.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- [E083] Type Error: tests/neg/i23637.scala:6:9 -----------------------------------------------------------------------
6 | export foo.pin.* // error: (because we need reflection to get at foo.pin)
| ^^^^^^^
| (Test.foo.pin : Object) is not a valid export prefix, since it is not an immutable path
|
| longer explanation available when compiling with `-explain`
12 changes: 12 additions & 0 deletions tests/neg/i23637.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
trait Foo extends reflect.Selectable
object Test:
val foo = new Foo:
object pin:
val x = 1
export foo.pin.* // error: (because we need reflection to get at foo.pin)

object OK:
object Foo:
object pin:
val x = 1
export Foo.pin.*