## Compiler version `main` ## Minimized code <!-- This code should be self contained, compilable (with possible failures) and as small as possible. Ideally, we should be able to just copy this code in a file and run `scalac` (and maybe `scala`) to reproduce the issue. --> ```Scala import language.experimental.captureChecking trait Resource def id[X](x: X): x.type = x def foo[M <: Resource](r: M^) = id(r) ``` ## Output ```scala -- [E007] Type Mismatch Error: issues/cc-setup-impure-classes.scala:5:35 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 5 |def foo[M <: Resource](r: M^) = id(r) | ^ | Found: (r : M^) | Required: M | | longer explanation available when compiling with `-explain` 1 error found ``` ## Expectation It should work.