Skip to content

Commit e7eb856

Browse files
authored
Merge pull request #12978 from dotty-staging/fix-12958
Retain transparent flag on exports
2 parents 270bd8b + ddfe36b commit e7eb856

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

compiler/src/dotty/tools/dotc/core/Flags.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ object Flags {
531531
val RetainedModuleClassFlags: FlagSet = RetainedModuleValAndClassFlags | Enum
532532

533533
/** Flags retained in export forwarders */
534-
val RetainedExportFlags = Given | Implicit | Inline
534+
val RetainedExportFlags = Given | Implicit | Inline | Transparent
535535

536536
/** Flags that apply only to classes */
537537
val ClassOnlyFlags = Sealed | Open | Abstract.toTypeFlags

tests/pos/i12958.scala

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import scala.quoted.*
2+
3+
package mylib:
4+
object Export:
5+
transparent inline def exported: Any = 1
6+
7+
object Import:
8+
transparent inline def imported: Any = 1
9+
10+
export Export.*
11+
12+
13+
import mylib.*
14+
import Import.*
15+
object Test:
16+
val oneFail : 1 = exported //error
17+
val oneWork : 1 = imported //works

0 commit comments

Comments
 (0)