Skip to content

Type Lambdas not accepted in F-Bound expression #8752

Closed
@rssh

Description

@rssh

Minimized code

import scala.collection.IterableOps

trait Arround1[C <:[X]=>>IterableOps[X,C,C[X]] ]

Output

[error] -- [E053] Type Error: /Users/rssh/work/oss/dotty-cps/dotty-cps/src/test/scala/cps/X.scala:3:41 
[error] 3 |trait Arround1[C <:[X]=>>IterableOps[X,C,C[X]] ]
[error]   |                                         ^^^^
[error]   |                                         C/T does not take type parameters
[error] -- Error: /Users/rssh/work/oss/dotty-cps/dotty-cps/src/test/scala/cps/X.scala:3:39 
[error] 3 |trait Arround1[C <:[X]=>>IterableOps[X,C,C[X]] ]
[error]   |                                       ^
[error]   |                  Type argument C/T has not the same kind as its bound [_]
[error] two errors found
[error] (Test / compileIncremental) Compilation failed

Expectation

Compiles. the same as

trait Arround2[C[X] <: IterableOps[X,C,C[X]] ]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions