Skip to content
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

Make sure we continue searching for symbols in try. #930

Merged
merged 2 commits into from Sep 18, 2019

Conversation

@tgodzik
Copy link
Collaborator

commented Sep 16, 2019

Fixes #879

image

Edit: Removed the additional block, it could be problematic to present in some clients

image

@tgodzik tgodzik force-pushed the tgodzik:fix-symbols-in-try branch 2 times, most recently from b4f5f4c to 749ce5b Sep 16, 2019
@tgodzik tgodzik requested review from olafurpg and gabro and removed request for olafurpg Sep 16, 2019
@@ -105,7 +105,7 @@ class DocumentSymbolProvider(trees: Trees) {
addChild(s"new $name", SymbolKind.Interface, t.pos, selection, "")
newOwner()
} else continue()
case _: Source | _: Template | _: Term.Block =>
case _: Source | _: Template | _: Term.Block | _: Term.Try =>

This comment has been minimized.

Copy link
@gabro

gabro Sep 16, 2019

Member

I gave this some thought and I was wondering on whether we should introduce a new owner, similarly to how we do for new Foo {}, since it introduces a different scope.

Or maybe this is fine, I don't know.

I implemented this myself the other day and I got stuck on this point 😂

This comment has been minimized.

Copy link
@tgodzik

tgodzik Sep 16, 2019

Author Collaborator

I was also thinking about it and I think now we should try with new owner.

This comment has been minimized.

Copy link
@tgodzik

tgodzik Sep 17, 2019

Author Collaborator

Ok, I changed it around and also added finally and catch. @gabro what do you think?

@tgodzik tgodzik force-pushed the tgodzik:fix-symbols-in-try branch from 749ce5b to 7ae7ea7 Sep 17, 2019
@gabro
gabro approved these changes Sep 17, 2019
Copy link
Member

left a comment

Looking 👍 Thanks for working on this @tgodzik !

@tgodzik tgodzik force-pushed the tgodzik:fix-symbols-in-try branch from 7ae7ea7 to 2e8d980 Sep 17, 2019
@tgodzik tgodzik merged commit 578dd43 into scalameta:master Sep 18, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
scalameta.metals Build #20190917.7 succeeded
Details
@tgodzik tgodzik deleted the tgodzik:fix-symbols-in-try branch Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.