File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -1185,7 +1185,7 @@ object SymDenotations {
1185
1185
|| is(Inline , butNot = Deferred )
1186
1186
|| is(JavaDefinedVal , butNot = Method )
1187
1187
|| isConstructor
1188
- || ! owner.isExtensibleClass
1188
+ || exists && ! owner.isExtensibleClass
1189
1189
1190
1190
/** A class is effectively sealed if has the `final` or `sealed` modifier, or it
1191
1191
* is defined in Scala 3 and is neither abstract nor open.
Original file line number Diff line number Diff line change
1
+ -- [E083] Type Error: tests/neg/i23637.scala:6:9 -----------------------------------------------------------------------
2
+ 6 | export foo.pin.* // error: (because we need reflection to get at foo.pin)
3
+ | ^^^^^^^
4
+ | (Test.foo.pin : Object) is not a valid export prefix, since it is not an immutable path
5
+ |
6
+ | longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change
1
+ trait Foo extends reflect.Selectable
2
+ object Test :
3
+ val foo = new Foo :
4
+ object pin :
5
+ val x = 1
6
+ export foo .pin .* // error: (because we need reflection to get at foo.pin)
7
+
8
+ object OK :
9
+ object Foo :
10
+ object pin :
11
+ val x = 1
12
+ export Foo .pin .*
You can’t perform that action at this time.
0 commit comments