ATProto Browser

ATProto Browser

Experimental browser for the Atmosphere

Post

Given a method signature like this: func foo<E: Error>( operation: @escaping () throws(E) -> Void, handler: @escaping (_ error: E) -> Void ) is there a way to make the call site see the concrete Error type when calling this? The compiler makes it any Error inside the handler closure.

Apr 21, 2025, 7:49 PM

Record data

{
  "uri": "at://did:plc:dnhprv4s4ctbua7d6nqlzmhb/app.bsky.feed.post/3lndwpge7e22e",
  "cid": "bafyreibewosycnkzmrpeabjejxtdmstdlie5vakwvvjpzqgajyjhyq544u",
  "value": {
    "text": "Given a method signature like this:\nfunc foo<E: Error>(\n    operation: @escaping () throws(E) -> Void,\n    handler: @escaping (_ error: E) -> Void\n)\n\nis there a way to make the call site see the concrete Error type when calling this? The compiler makes it any Error inside the handler closure.",
    "$type": "app.bsky.feed.post",
    "langs": [
      "cs"
    ],
    "createdAt": "2025-04-21T19:49:33.256Z"
  }
}