mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
[FunC] Produce an error on get methods hash (method_id) collision
This commit is contained in:
parent
7b8268d99f
commit
8932c515c9
4 changed files with 23 additions and 2 deletions
15
crypto/func/auto-tests/tests/invalid-get-method-2.fc
Normal file
15
crypto/func/auto-tests/tests/invalid-get-method-2.fc
Normal file
|
@ -0,0 +1,15 @@
|
|||
get int secret() pure {
|
||||
return 0;
|
||||
}
|
||||
get int balanced() pure {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main() {
|
||||
return secret() + balanced();
|
||||
}
|
||||
|
||||
{-
|
||||
@compilation_should_fail
|
||||
@stderr GET methods hash collision: `secret` and `balanced` produce the same hash
|
||||
-}
|
Loading…
Add table
Add a link
Reference in a new issue