Skip to content

Fix AnnotatedType#stripTypeVar to not strip the annotation #397

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

Closed
wants to merge 1 commit into from

Conversation

smarter
Copy link
Member

@smarter smarter commented Mar 9, 2015

This fixes Types#hasAnnotation which calls stripTypeVar which means that
it always returned false before.

@olhotak : please review

This fixes Types#hasAnnotation which calls stripTypeVar which means that
it always returned false before.
@olhotak
Copy link
Contributor

olhotak commented Mar 11, 2015

Determining the correct fix to this is the subject of issue #325. That issue has only questions and no answers.

A problem is that much of the code throughout dotty relies on the current behaviour: there are many instances of tpe.stripTypeVar match { ... }, where the match cases do not handle typevars or annotated types. Fixing that was the intent of PR #350, but that was a huge invasive change, so it was dropped.

Probably the best compromise is to merge this change now, and fix call sites of stripTypeVar that rely on it to also strip annotations individually and iteratively when they are triggered by specific tests. So, LGTM.

@smarter
Copy link
Member Author

smarter commented Mar 20, 2015

Equivalent fix merged as part of #394.

@smarter smarter closed this Mar 20, 2015
tgodzik added a commit to tgodzik/scala3 that referenced this pull request May 7, 2025
Backport "pc: fix: inline value when def indentation equals 2" to 3.3 LTS
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.

3 participants