Potential Issue with `catchTag` and `Effect.fnUntraced` in Version 3.16.8

I fear the new definition of catchTag breaks the usage with Effect.fnUntraced / Effect.fn when piping. Can someone double check this? I'm on 3.16.8:

Repro: https://effect.website/play#a03fc9e50f0d

class Error1 extends Data.TaggedError("error1") {
}

class Error2 extends Data.TaggedError("error2") {
}

declare const eff: Effect<void, Error1 | Error2>

pipe(
  eff,
  Effect.catchTag(
    "error1",
    (err) => {
      // err is Error1 :)
      console.log("error1", err)
      return Effect.succeed(undefined)
  })
)

pipe(
  eff,
  Effect.catchTag(
    "error1",
    (err) =>
      // err is Error1 :)
      Effect.gen(function*() {
        console.log("error1", err)
      })
  )
)

pipe(
  eff,
  Effect.catchTag(
    "error1",
    Effect.fnUntraced(function*(err) {
      // err is any :(
      console.log("error1", err)
    })
  )
)
Was this page helpful?