solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol

10 lines
332 B
Solidity
Raw Normal View History

contract C {
function f(bytes bytesAsCalldata) external {
assembly {
let x := bytesAsCalldata
}
}
}
// ----
2018-08-06 10:42:39 +00:00
// TypeError: (102-117): Call data elements cannot be accessed directly. Copy to a local variable first or use "calldataload" or "calldatacopy" with manually determined offsets and sizes.