Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create package protected class instance using apply method #22626

Closed
WojciechMazur opened this issue Feb 20, 2025 · 0 comments · Fixed by #22627
Closed

Cannot create package protected class instance using apply method #22626

WojciechMazur opened this issue Feb 20, 2025 · 0 comments · Fixed by #22627
Assignees
Labels
area:typer itype:bug regression This worked in a previous version but doesn't anymore

Comments

@WojciechMazur
Copy link
Contributor

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

@WojciechMazur WojciechMazur added area:typer itype:bug regression This worked in a previous version but doesn't anymore labels Feb 20, 2025
@som-snytt som-snytt self-assigned this Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:typer itype:bug regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants