-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[AST] Print ErrorType as _
#84426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AST] Print ErrorType as _
#84426
Conversation
Use the same set of PrintOptions when printing the results for different requests.
Use for a few `dump` methods, generic signature debugging, and enable by default for swift-ide-test.
In preparation for removing UnresolvedType in favor of ErrorType, start printing ErrorType as `_` unless we've enabled debug printing. `<<error type>>` should never be presented to the user, instead `_` now just consistently means "unknown type".
9bb05d3
to
0bfbe98
Compare
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, looks good to me.
Does this future direction mean that we should be creating UnresolvedType rather than ErrorType when e.g. distributed fails to find a type of an associated type etc?
It's the other way around :) |
Yeah the goal here is to remove UnresolvedType and just use ErrorType instead |
Ah got it :-) we've been using ErrorType everywhere so nothing to worry about then, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll all for removing UnresolvedType
. I think it was originally introduced to accommodate CSDiag but we don't really need this anymore.
In preparation for removing UnresolvedType in favor of ErrorType, start printing ErrorType as
_
unless we've enabled debug printing.<<error type>>
should never be presented to the user, instead_
now just consistently means "unknown type".