Files
c3c/test/test_suite/contracts/contract_deprecation.c3
Christoffer Lerno 7c81bb35ca Refactored contracts (#2960)
* - Properly support `@deprecated` as contract.
- Support deprecating enum values.
- Refactor contracts

* Always copy enum constants.

* Bugfix.
2026-02-20 01:51:28 +01:00

16 lines
199 B
Plaintext

constdef Foo
{
<* @deprecated *>
ABC
}
<* @deprecated *>
Foo a;
fn int main()
{
Foo f = Foo.ABC; // #warning: 'ABC' is deprecated.
Foo b = a; // #warning: 'a' is deprecated.
return 0;
}