-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Don't explain erroneous bounds #19338
Conversation
174800f
to
4c2d5d8
Compare
case skolem: SkolemType => true | ||
case sym: Symbol => | ||
case skolem: SkolemType => true | ||
case sym: Symbol => |
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.
case sym: Symbol => | |
case sym: Symbol => |
There is nothing on the right of =>
to align.
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.
Thanks, I go back & forth on this style. The question is, in mix of one-liners, is the odd arrow also aligned?
Also default case: case _ => ???
where it's always ugly to align.
I'm not a huge fan of formatters, but for this use case, it would restore my decision budget.
|
||
@main def main = foo: | ||
def f() = () | ||
f(_) // error was OOM formatting TypeVar(TypeParamRef(T)) when offering explanations |
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.
it might be worth adding a tests/neg/i19334.check
file for this one.
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.
footnote I had one locally. I'm unaccustomed to the dotty-local customs around check files.
shell history
touch tests/neg/i19334.check
git add tests/neg/i19334.*
git rm tests/neg/i19334.check
I need shell history with comments, to tell me why I decided to do that.
case skolem: SkolemType => true | ||
case sym: Symbol => | ||
case skolem: SkolemType => true | ||
case sym: Symbol => | ||
ctx.gadt.contains(sym) && ctx.gadt.fullBounds(sym) != TypeBounds.empty |
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.
This equality check looks like the previous tweak to use =:=
for this comparison. I have not yet investigated / learned about it.
@som-snytt could you squash the commits before we merge? |
14e0f90
to
23b3d7f
Compare
Thanks, squashed. |
23b3d7f
to
a227ce2
Compare
Fixes #19334