deprecated attribute for procedure declarations

This commit is contained in:
gingerBill
2018-03-03 11:16:48 +00:00
parent 08c87e57f8
commit 9274f29ca9
10 changed files with 89 additions and 24 deletions
+15
View File
@@ -778,6 +778,20 @@ cstring_example :: proc() {
// cast(cstring)string is O(N)
}
deprecated_attribute :: proc() {
@(deprecated="Use foo_v2 instead")
foo_v1 :: proc(x: int) {
fmt.println("foo_v1");
}
foo_v2 :: proc(x: int) {
fmt.println("foo_v2");
}
// NOTE: Uncomment to see the warning messages
// foo_v1(1);
}
main :: proc() {
when true {
general_stuff();
@@ -792,5 +806,6 @@ main :: proc() {
explicit_procedure_overloading();
complete_switch();
cstring_example();
deprecated_attribute();
}
}