Skip to content

Fix #10127: Don't try to get tags after error #10851

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

Merged
merged 1 commit into from
Jan 4, 2021

Conversation

nicolasstucki
Copy link
Contributor

The tags may be unavailablle due to the error.

The tags may be unavailablle due to the error.
@nicolasstucki nicolasstucki linked an issue Dec 18, 2020 that may be closed by this pull request
@nicolasstucki nicolasstucki marked this pull request as ready for review December 18, 2020 13:03
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM

val tagRef = getQuoteTypeTags.getTagRef(splice.qualifier.tpe.asInstanceOf[TermRef])
ref(tagRef).withSpan(splice.span)
if ctx.reporter.hasErrors then
splice
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to transform the body for this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to. That tree will not be used after the error. We could return body1.select(...).with span(...) but it might just complicate the code for no practical reason.

@nicolasstucki nicolasstucki merged commit b7e907a into scala:master Jan 4, 2021
@nicolasstucki nicolasstucki deleted the fix-#10127 branch January 4, 2021 09:35
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NoSuchElementException when lifting a Type
3 participants