You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmoduleCalixir.Calendar.Hebrewdo@nisan1@iyyar2@Sivan3@tammuz4@av5@elul6@tishri7@marheshvan8@kislev9@tevet10@shevat11@adar12# This one creates an error.@adarii13defnisan,do: @nisandefiyyar,do: @iyyardefsivan,do: @Sivandeftammuz,do: @tammuzdefav,do: @avdefelul,do: @eluldeftishri,do: @tishridefmarheshvan,do: @marheshvandefkislev,do: @kislevdeftevet,do: @tevetdefshevat,do: @shevatdefadar,do: @adar# Falsely flagged as 'Unresolved module attibute'.defadarii,do: @adariiend
If two module attributes start with the same letters (like @adar and @adarii in the code above), then later in the code, the shorter one is falsely flagged as an 'Unresolved module attribute'.
The text was updated successfully, but these errors were encountered:
It is probably due to when I relaxed the references implementation to support Go To Definition and Show Info when typing and it broke an assumption in the module attribute annotator because it assumes there must be exactly one resolution instead of checking that there is 1 valid match. (Partial matches aren't marked as valid.)
…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.
If two module attributes start with the same letters (like
@adar
and@adarii
in the code above), then later in the code, the shorter one is falsely flagged as an 'Unresolved module attribute'.The text was updated successfully, but these errors were encountered: