Skip to content

Cannot create package protected class instance using apply method #22626

Closed
@WojciechMazur

Description

@WojciechMazur

Based on OpenCB failure in tschuchortdev/hkd4s - Open CB logs

Compiler version

Last good release: 3.7.0-RC1-bin-20250216-41d4762-NIGHTLY
First bad release: 3.7.0-RC1-bin-20250217-705e10e-NIGHTLY
Bisect points to fddab10

Minimized code

package foo.internal

protected[foo] class ArrayProduct(val elems: Array[Any])
package foo

import foo.internal.ArrayProduct

def Test = {
  val _ = ArrayProduct(Array[Any]())
}

Output

-- [E006] Not Found Error: /Users/wmazur/projects/scala/sandbox/test.scala:7:10 ----------------------------------------------------------------------------------------------------------------------------
7 |  val _ = ArrayProduct(Array[Any]())
  |          ^^^^^^^^^^^^
  |          Not found: ArrayProduct

Expectation

Should compile

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions