mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Further #2226 fixes.
This commit is contained in:
23
test/test_suite/functions/deprecation.c3
Normal file
23
test/test_suite/functions/deprecation.c3
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
fn int foo() @deprecated
|
||||
{
|
||||
if (false) foo();
|
||||
return 1;
|
||||
}
|
||||
|
||||
fn int main() @allow_deprecated
|
||||
{
|
||||
foo();
|
||||
return 0;
|
||||
}
|
||||
|
||||
fn int foo2() @deprecated
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
fn int main2()
|
||||
{
|
||||
foo2(); // #warning: 'foo2' is deprecated
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user