mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixed using string as a type for struct member
This commit is contained in:
+6
-3
@@ -347,10 +347,13 @@ private:
|
||||
class StructDefinition: public Declaration
|
||||
{
|
||||
public:
|
||||
StructDefinition(SourceLocation const& _location,
|
||||
ASTPointer<ASTString> const& _name,
|
||||
std::vector<ASTPointer<VariableDeclaration>> const& _members):
|
||||
StructDefinition(
|
||||
SourceLocation const& _location,
|
||||
ASTPointer<ASTString> const& _name,
|
||||
std::vector<ASTPointer<VariableDeclaration>> const& _members
|
||||
):
|
||||
Declaration(_location, _name), m_members(_members) {}
|
||||
|
||||
virtual void accept(ASTVisitor& _visitor) override;
|
||||
virtual void accept(ASTConstVisitor& _visitor) const override;
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
||||
TypeType const& type = dynamic_cast<TypeType const&>(*_functionCall.expression().type());
|
||||
auto const& structType = dynamic_cast<StructType const&>(*type.actualType());
|
||||
|
||||
m_context << u256(max(32u, structType.calldataEncodedSize(true)));
|
||||
m_context << max(u256(32u), structType.memorySize());
|
||||
utils().allocateMemory();
|
||||
m_context << eth::Instruction::DUP1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user