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 @@ -1220,7 +1220,7 @@ object SymDenotations {
1220
1220
|| is(Inline , butNot = Deferred )
1221
1221
|| is(JavaDefinedVal , butNot = Method )
1222
1222
|| isConstructor
1223
- || ! owner.isExtensibleClass && ! is(Deferred )
1223
+ || exists && ! owner.isExtensibleClass && ! is(Deferred )
1224
1224
// Deferred symbols can arise through parent refinements under x.modularity.
1225
1225
// For them, the overriding relationship reverses anyway, so
1226
1226
// being in a final class does not mean the symbol cannot be
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