Skip to content

Regression in durban/choam - type argument does not conform to upper bound #22596

Open
@jchyb

Description

@jchyb

https://github.com/VirtusLab/community-build3/actions/runs/13209505213/job/36881113788

Compiler version

Works: 3.6.3
Broken: 3.6.4-RC1

Minimized code

abstract class MutHamt[K <: Hamt.HasHash, V <: Hamt.HasKey[K], I <: Hamt[_, _, I]]

abstract class Hamt[K <: Hamt.HasHash, V <: Hamt.HasKey[K], H <: Hamt[K, V, H]]

object Hamt {
  trait HasKey[K <: HasHash]
  trait HasHash
}

Output

[error] ./main.scala:1:80
[error] Type argument I does not conform to upper bound Hamt[? <: Hamt.HasHash, ? <: Hamt.HasKey[Hamt[?, ?, I]#K], I]
[error] abstract class MutHamt[K <: Hamt.HasHash, V <: Hamt.HasKey[K], I <: Hamt[_, _, I]]
[error]                                                                                ^

Expectation

No error.
Already submitted once here, but didn't get fixed with the closing PR, so perhaps it was unrelated to that regression after all.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions