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

Check if at least one resolution for module attribute references is valid #1781

Merged
merged 6 commits into from May 23, 2020

Conversation

KronicDeth
Copy link
Owner

@KronicDeth KronicDeth commented May 23, 2020

Fixes #1767

Changelog

Enhancements

  • Convert annotator.ModuleAttribute to Kotlin
    • Apply optional Kotlin transformations.

Bug FIxes

  • Check if at least one resolution for module attribute references is valid

    Previously, it was checked if module attributes resolved to exactly one declaration, but this is no longer true with the looser reference resolution that allows invalid results for PisPolyVariantReference. resolve() will return null when there is more than one result from multiResolve even if some are invalid, so we need to explicitly check if the PsiReference is a PsiPolyVariantReference and if so check if any are valid.

  • Fix deprecation warnings for annotator.ModuleAttribute.

  • Quick fixes for inlinables in annotator.ModuleAttribute.

…alid

Fixes #1767

Previously, it was checked if module attributes resolved to exactly one declaration, but this is no longer true with the looser reference resolution that allows invalid results for PisPolyVariantReference.  `resolve()` will return `null` when there is more than one result from `multiResolve` even if some are invalid, so we need to explicitly check if the `PsiReference` is a `PsiPolyVariantReference` and if so check if any are valid.
@KronicDeth KronicDeth merged commit 1addf2e into master May 23, 2020
@KronicDeth KronicDeth deleted the 1767 branch May 23, 2020 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module attribute falsely flagged as 'Unresolved module attribute'
1 participant