SE-0244: Opaque Result Types

I don't think it's difficult to produce a better error message. I haven't gotten far enough in the implementation to work on improving diagnostics yet. I would like to have it recognize when you're trying to match two independent opaque types and provide a message more like:

error: return types of 'g' and 'f' may have different underlying types
note: 'g()' refers to 'g', declared here
note: 'f()' refers to 'f', declared here
1 Like