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 {
594594
595595 final val ImplicitOrImpliedOrGivenTerm = ImplicitOrImpliedOrGiven .toTermFlags
596596
597+ /** Flags retained in export forwarders */
598+ final val RetainedExportFlags = ImplicitOrImpliedOrGiven | Extension
599+
597600 /** Assumed to be pure */
598601 final val StableOrErased : FlagSet = StableRealizable | Erased
599602
Original file line number Diff line number Diff line change @@ -988,7 +988,7 @@ class Namer { typer: Typer =>
988988 val maybeStable = if (mbr.symbol.isStableMember) StableRealizable else EmptyFlags
989989 ctx.newSymbol(
990990 cls, alias,
991- Exported | Method | Final | maybeStable | mbr.symbol.flags & ImplicitOrImpliedOrGiven ,
991+ Exported | Method | Final | maybeStable | mbr.symbol.flags & RetainedExportFlags ,
992992 mbr.info.ensureMethodic,
993993 coord = span)
994994 }
Original file line number Diff line number Diff line change 22printing
33scanning
44config
5+ printing
6+ scanning
7+ scanning
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ object Test extends App {
1212
1313 class Scanner {
1414 def scan () = println(" scanning" )
15+ def (x : Any ) scanned = scan()
1516 }
1617 object Scanner extends Scanner
1718
@@ -29,6 +30,16 @@ object Test extends App {
2930 Copier .cfg
3031 Copier .config
3132 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()
3243}
3344
3445final class Foo {
You can’t perform that action at this time.
0 commit comments