mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix mapping conversion.
This commit is contained in:
parent
bfe8737898
commit
7f0cc433be
@ -3072,6 +3072,12 @@ string YulUtilFunctions::conversionFunction(Type const& _from, Type const& _to)
|
||||
solAssert(false, "Invalid conversion from " + _from.canonicalName() + " to " + _to.canonicalName());
|
||||
break;
|
||||
}
|
||||
case Type::Category::Mapping:
|
||||
{
|
||||
solAssert(_from == _to, "");
|
||||
body = "converted := value";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
solAssert(false, "Invalid conversion from " + _from.canonicalName() + " to " + _to.canonicalName());
|
||||
}
|
||||
|
@ -12,5 +12,7 @@ contract test {
|
||||
return (m1[1], m1[2], m2[1], m2[2]);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 42, 0, 0, 21
|
||||
|
Loading…
Reference in New Issue
Block a user