Skip to content

Bounded type parameters with export #18569

Closed
@SimonGuilloud

Description

@SimonGuilloud

Compiler version

3.3.1, 3.2.1

Minimized code

trait M1 {
  trait A
  trait F[T<:A]
}

object M2 extends M1

trait Test{
  export M2.*
  def y: F[A]
}

Output

Type argument Test.this.A does not conform to upper bound M1.this.A

Expectation

No error.

If the bound T<:A is in a function rather than a trait, compiles. If export is replaced by import, compiles. If F is defined in M2, compiles. If F is a class rather than a trait, does not compile

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions