Skip to content

Commit

Permalink
Merge pull request scala#12978 from dotty-staging/fix-12958
Browse files Browse the repository at this point in the history
Retain transparent flag on exports
  • Loading branch information
odersky authored Jul 5, 2021
2 parents 270bd8b + ddfe36b commit e7eb856
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Flags.scala
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ object Flags {
val RetainedModuleClassFlags: FlagSet = RetainedModuleValAndClassFlags | Enum

/** Flags retained in export forwarders */
val RetainedExportFlags = Given | Implicit | Inline
val RetainedExportFlags = Given | Implicit | Inline | Transparent

/** Flags that apply only to classes */
val ClassOnlyFlags = Sealed | Open | Abstract.toTypeFlags
Expand Down
17 changes: 17 additions & 0 deletions tests/pos/i12958.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import scala.quoted.*

package mylib:
object Export:
transparent inline def exported: Any = 1

object Import:
transparent inline def imported: Any = 1

export Export.*


import mylib.*
import Import.*
object Test:
val oneFail : 1 = exported //error
val oneWork : 1 = imported //works

0 comments on commit e7eb856

Please sign in to comment.