Skip to content

F-bounded type cannot be used in type member - Cyclic reference #10638

Closed
@Sciss

Description

@Sciss

The new "fix" for disallowing some F-bounded types (cf. #10256) disallows some perfectly valid code.

Minimized code

package woes

trait Txn[T <: Txn[T]]

trait Impl[Repr[~ <: Txn[~]]] {
  final type Ext = Extension[Repr]  // Huh!
}

trait Extension[Repr[~ <: Txn[~]]]

Output

/data/temp/DottyFBoundedWoes/src/main/scala/woes/Woes.scala:9:27
Cyclic reference involving type Repr
trait Extension[Repr[~ <: Txn[~]]]

Expectation

Adding the fixed type Ext to Impl shouldn't cause the compiler to reject the definition of Extension.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions