mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
* - Properly support `@deprecated` as contract. - Support deprecating enum values. - Refactor contracts * Always copy enum constants. * Bugfix.
16 lines
199 B
Plaintext
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;
|
|
}
|