-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Allow this.f.selector
to be pure.
#3498
Conversation
4418f9a
to
5916cf1
Compare
if (Declaration const* declaration = expr->annotation().referencedDeclaration) | ||
{ | ||
u256 identifier; | ||
if (auto const* variable = dynamic_cast<VariableDeclaration const*>(declaration)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm I wonder if we actually want to support .selector
on public variables. I don't think we had test cases for that before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall I add a test case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works. I will add a test case.
@@ -6904,15 +6904,7 @@ BOOST_AUTO_TEST_CASE(function_types_sig) | |||
CHECK_ERROR(text, TypeError, "Member \"selector\" not found"); | |||
text = R"( | |||
contract C { | |||
function f() view external returns (bytes4) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we had a duplicate case here? :)
Perhaps something was lost during rebases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one of the cases used var
before but we removed that and now they are identical.
Updated. |
Fails on end-to-end tests. |
96b7ab7
to
aea9e7f
Compare
Fixes #3494