mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-15 04:32:21 +00:00
`get` keyword behaves exactly like `method_id` (auto-calc hash), but it's placed on the left, similar to Tact: `get T name()`. `method_id(n)` is still valid, considering it can't be invoked by name, since a client will compute another hash. It's supposed it will be still used in tests and in low-level code (not to be called externally, but to be called after replacing c3). `get(hash)` is invalid, this keyword does not accept anything.
8 lines
156 B
Text
8 lines
156 B
Text
get (int, int) hello(int x, int y) method_id(123) {
|
|
return (x, y);
|
|
}
|
|
|
|
{-
|
|
@compilation_should_fail
|
|
@stderr both `get` and `method_id` are not allowed
|
|
-}
|