Skip to content

Package-private nested case class in a library can be seen from other packages #18545

Closed
@kubukoz

Description

@kubukoz

Compiler version

3.3.1, 3.4.0-RC1-bin-20230911-1be790c-NIGHTLY

Minimized code

//> using scala "3.3.1"
//> using lib "org.typelevel::cats-effect:3.5.1"
import cats.effect.IOLocal
@main def demo = println(IOLocal.IOLocalImpl.apply(42))

Note: IOLocalImpl is defined as private[IOLocal] final class IOLocalImpl[A](default: A)

Output

cats.effect.IOLocal$IOLocalImpl@483bf400

Expectation

Compiler failure

Extra detail

I wasn't able to reproduce this without a library dependency.

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