mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix invalid "explicit storage keyword" warning for reference members of structs.
This commit is contained in:
parent
aafcc3606c
commit
883666d2c0
@ -3,6 +3,7 @@
|
|||||||
Features:
|
Features:
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
* Type Checker: Fix invalid "specify storage keyword" warning for reference members of structs.
|
||||||
|
|
||||||
|
|
||||||
### 0.4.13 (2017-07-06)
|
### 0.4.13 (2017-07-06)
|
||||||
|
@ -295,7 +295,7 @@ void ReferencesResolver::endVisit(VariableDeclaration const& _variable)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
typeLoc = DataLocation::Storage;
|
typeLoc = DataLocation::Storage;
|
||||||
if (!_variable.isStateVariable())
|
if (_variable.isLocalVariable())
|
||||||
m_errorReporter.warning(
|
m_errorReporter.warning(
|
||||||
_variable.location(),
|
_variable.location(),
|
||||||
"Variable is declared as a storage pointer. "
|
"Variable is declared as a storage pointer. "
|
||||||
|
@ -6160,7 +6160,7 @@ BOOST_AUTO_TEST_CASE(warn_unspecified_storage)
|
|||||||
{
|
{
|
||||||
char const* text = R"(
|
char const* text = R"(
|
||||||
contract C {
|
contract C {
|
||||||
struct S { uint a; }
|
struct S { uint a; string b; }
|
||||||
S x;
|
S x;
|
||||||
function f() {
|
function f() {
|
||||||
S storage y = x;
|
S storage y = x;
|
||||||
|
Loading…
Reference in New Issue
Block a user