aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-12-04 20:00:45 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-12-11 10:34:42 +0800
commit9e36c189e50b033d25d3ab2342a7a0e673035a68 (patch)
tree6484aa8e5d340b0615fb4739ea38580c3093ae30
parente9d256ddf4322050f9b834abd3400f1cb5377f68 (diff)
downloaddexon-solidity-9e36c189e50b033d25d3ab2342a7a0e673035a68.tar.gz
dexon-solidity-9e36c189e50b033d25d3ab2342a7a0e673035a68.tar.zst
dexon-solidity-9e36c189e50b033d25d3ab2342a7a0e673035a68.zip
Fix struct encoding warning for libraries.
-rw-r--r--libsolidity/analysis/TypeChecker.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index daa5471a..a578ad0f 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -573,6 +573,7 @@ bool TypeChecker::visit(FunctionDefinition const& _function)
if (
_function.visibility() > FunctionDefinition::Visibility::Internal &&
type(*var)->category() == Type::Category::Struct &&
+ !type(*var)->dataStoredIn(DataLocation::Storage) &&
!_function.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::ABIEncoderV2)
)
m_errorReporter.typeError(