Convert reference types to pointers in member function conversion.

This commit is contained in:
chriseth 2017-03-01 16:02:36 +01:00
parent f35b70f3a3
commit a689152c4b

View File

@ -2493,7 +2493,7 @@ FunctionTypePointer FunctionType::asMemberFunction(bool _inLibrary, bool _bound)
{ {
auto refType = dynamic_cast<ReferenceType const*>(t.get()); auto refType = dynamic_cast<ReferenceType const*>(t.get());
if (refType && refType->location() == DataLocation::CallData) if (refType && refType->location() == DataLocation::CallData)
parameterTypes.push_back(refType->copyForLocation(DataLocation::Memory, false)); parameterTypes.push_back(refType->copyForLocation(DataLocation::Memory, true));
else else
parameterTypes.push_back(t); parameterTypes.push_back(t);
} }