1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

[FunC] Forbid auto-creating undefined symbols

This commit is contained in:
Aleksandr Kirsanov 2024-05-02 20:54:07 +03:00
parent 4994ae8edd
commit f217a7d312
No known key found for this signature in database
GPG key ID: B758BBAA01FFB3D3
7 changed files with 40 additions and 16 deletions

View file

@ -0,0 +1,12 @@
int main(int x) {
return 1 + demo();
}
int demo() {
return 2;
}
{-
@compilation_should_fail
@stderr undefined symbol `demo`
-}

View file

@ -0,0 +1,10 @@
int main(int x) {
return 1 + demo;
}
global int demo;
{-
@compilation_should_fail
@stderr undefined symbol `demo`
-}

View file

@ -0,0 +1,10 @@
int demo(int x);
int main(int x) {
return 1 + demo(x);
}
{-
@compilation_should_fail
@stderr function `demo` is just declared, not implemented
-}