Skip to content

Fix shadowing warning (2519) to cover inherited state variables#16800

Open
AdrianMtzTrev wants to merge 1 commit into
argotorg:developfrom
AdrianMtzTrev:develop
Open

Fix shadowing warning (2519) to cover inherited state variables#16800
AdrianMtzTrev wants to merge 1 commit into
argotorg:developfrom
AdrianMtzTrev:develop

Conversation

@AdrianMtzTrev

Copy link
Copy Markdown

Moves warnHomonymDeclarations() after resolveNamesAndTypes() in CompilerStack.cpp.

Adds 5 syntax tests for inherited state variable shadowing:

  • Local variable vs inherited state variable
  • Function parameter vs inherited state variable
  • Named return vs inherited state variable
  • Transitive inheritance (A -> B -> C)
  • Abstract base with inherited state variable

Closes #16698

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.

Extend shadowing warning to cover local variables that shadow inherited state variables

1 participant