File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -594,6 +594,9 @@ object Flags {
594
594
595
595
final val ImplicitOrImpliedOrGivenTerm = ImplicitOrImpliedOrGiven .toTermFlags
596
596
597
+ /** Flags retained in export forwarders */
598
+ final val RetainedExportFlags = ImplicitOrImpliedOrGiven | Extension
599
+
597
600
/** Assumed to be pure */
598
601
final val StableOrErased : FlagSet = StableRealizable | Erased
599
602
Original file line number Diff line number Diff line change @@ -988,7 +988,7 @@ class Namer { typer: Typer =>
988
988
val maybeStable = if (mbr.symbol.isStableMember) StableRealizable else EmptyFlags
989
989
ctx.newSymbol(
990
990
cls, alias,
991
- Exported | Method | Final | maybeStable | mbr.symbol.flags & ImplicitOrImpliedOrGiven ,
991
+ Exported | Method | Final | maybeStable | mbr.symbol.flags & RetainedExportFlags ,
992
992
mbr.info.ensureMethodic,
993
993
coord = span)
994
994
}
Original file line number Diff line number Diff line change 2
2
printing
3
3
scanning
4
4
config
5
+ printing
6
+ scanning
7
+ scanning
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ object Test extends App {
12
12
13
13
class Scanner {
14
14
def scan () = println(" scanning" )
15
+ def (x : Any ) scanned = scan()
15
16
}
16
17
object Scanner extends Scanner
17
18
@@ -29,6 +30,16 @@ object Test extends App {
29
30
Copier .cfg
30
31
Copier .config
31
32
Copier .config2
33
+
34
+ def test () = {
35
+ import Copier ._
36
+ print()
37
+ scanIt()
38
+ val x = config2
39
+ val y = cfg
40
+ 1 .scanned
41
+ }
42
+ test()
32
43
}
33
44
34
45
final class Foo {
You can’t perform that action at this time.
0 commit comments