solidity/test/libsolidity/syntaxTests/tryCatch/invalid_returns.sol

14 lines
371 B
Solidity

contract C {
function f() public returns (uint8, uint) {
// Implicitly convertible, but not exactly the same type.
try this.f() returns (uint, int x) {
} catch {
}
}
}
// ----
// TypeError 6509: (157-161): Invalid type, expected uint8 but got uint256.
// TypeError 6509: (163-168): Invalid type, expected uint256 but got int256.