Skip to content

Export of class fails with "constructor proxy ... cannot be used as a value" #11128

Closed
@ellbur

Description

@ellbur

With Scala 3.0.0-M3

Minimized code

A minimal example consisting of the two source files below is on GitHub.

package.scala

package object foo {
  export foo.bar.Bar
}

Bar.scala

package foo.bar

class Bar

Output

$ sbt compile
[error] 3 |  export foo.bar.Bar
[error]   |         ^^^^^^^
[error]   |         constructor proxy object Bar cannot be used as a value

Expectation

Code should compile without errors.

Metadata

Metadata

Assignees

Labels

area:desugarDesugaring happens after parsing but before typing, see desugar.scalaitype:bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions