Skip to content

exported transparent inline methods loose transparency #12958

Closed
@soronpo

Description

@soronpo

Compiler version

v3.0.1-RC2 (also tested on nightly)

Minimized code

See minimized project at: https://github.com/soronpo/dottybug/tree/transparent_fail

mylib/Main.scala

package mylib
import scala.quoted.*

object Export:
  transparent inline def exported: Any = 1

object Import:
  transparent inline def imported: Any = 1

export Export.*

Test.scala

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

Output

[error] -- [E007] Type Mismatch Error: C:\IdeaProjects\dottybug\src\main\scala\Test.scala:4:20 ------
--------                                                                                             
[error] 4 |  val oneFail : 1 = exported //error                                                      
[error]   |                    ^^^^^^^^                                                              
[error]   |                    Found:    Any                                                         
[error]   |                    Required: (1 : Int)                                                   
[error] one error found                                                                              

Expectation

No error.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions