Skip to content

can't find type required by parameter error when referencing Scala 3 code #13174

@jadenPete

Description

@jadenPete

Reproduction steps

Scala 2 version: 2.13.18
Scala 3 version: 3.7.4

  1. Clone this minimum reproducibility case:
    https://github.com/jadenPete/scala-cant-find-type-bug-reproduction

  2. Run sbt compile

  3. Observe the following compilation error:

[error] <REDACTED>/scala2/Main.scala:2:45: can't find type required by parameter inner in class Child.Middle: Child.this.Inner; perhaps it is missing from the classpath.
[error]   def useMiddle(child: Child)(middle: child.Middle): Unit = ???
[error]                                             ^
[error] one error found

Problem

I'd expect this to compile.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions