mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow packed encoding of literals.
This commit is contained in:
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
|
||||
// ----
|
||||
// Warning: (92-93): The type of "int_const 1" was inferred as uint8. This is probably not desired. Use an explicit type to silence this warning.
|
||||
// TypeError: (92-93): Cannot perform packed encoding for a literal. Please convert it to an explicit type first.
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
pragma experimental "v0.5.0";
|
||||
contract C {
|
||||
function k() pure public returns (bytes) {
|
||||
return abi.encodePacked(1);
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// TypeError: (122-123): Cannot perform packed encoding for a literal. Please convert it to an explicit type first.
|
||||
Reference in New Issue
Block a user