Skip to content

Re-allow multiple modifiers per function.#2652

Merged
chriseth merged 1 commit intodevelopfrom
fixMultiModifier
Jul 27, 2017
Merged

Re-allow multiple modifiers per function.#2652
chriseth merged 1 commit intodevelopfrom
fixMultiModifier

Conversation

@chriseth
Copy link
Contributor

Properly fixes #2288
Fixes #2621

@chriseth chriseth requested a review from axic July 27, 2017 10:54
@axic
Copy link
Contributor

axic commented Jul 27, 2017

Tests fail

@chriseth
Copy link
Contributor Author

Tests should be fixed now.

Bugfixes:
* Type Checker: Fix invalid "specify storage keyword" warning for reference members of structs.
* Type Checker: Mark modifiers as internal.
* Type Checker: Re-allow multiple mentions of the same modifier per function.
Copy link
Contributor

Choose a reason for hiding this comment

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

mentions? uses is more fitting I think? Though this is not important.

solAssert(m_localVariables.count(&_declaration) && !m_localVariables[&_declaration].empty(), "");
m_localVariables[&_declaration].pop_back();
if (m_localVariables[&_declaration].empty())
m_localVariables.erase(&_declaration);
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I see this is just a memory conservation piece, it has no effect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not avoid the ambiguous situation where the declaration is present in the map as a key but is not actually a current local variable.

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.

False compiler DeclarationError: Modifier already used for this function Size and stack pos mismatch for multiple non-empty 'post condition' modifier

2 participants