Skip to content

Constructor Proxies not visible to extension *only* when the extension is exported from #15944

Open
@bishabosha

Description

@bishabosha

A constructor proxy is not visible to an extension method that is exported from

Compiler version

3.2.0

Minimized code

object Foo:
  class Wrap(a: String):
    def wow = s"$a - WOW!"
  extension (s: String)
    private def wrap = Wrap(s)
    export wrap.* // comment this line and it works

Output

-- [E006] Not Found Error: foo.scala:5:23 --------------------------------------
5 |    private def wrap = Wrap(s)
  |                       ^^^^
  |                       Not found: Wrap
  |
  | longer explanation available when compiling with `-explain`
1 error found

Expectation

No error, like when I remove the export

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions