| 1 | const used_const = 1 |
| 2 | const used_by_pub_const = 3 |
| 3 | const const_used_by_unused_fn = 2 |
| 4 | const unused_const = 4 |
| 5 | |
| 6 | fn used_fn() int { |
| 7 | return used_const |
| 8 | } |
| 9 | |
| 10 | fn helper_used_by_pub() int { |
| 11 | return used_by_pub_const |
| 12 | } |
| 13 | |
| 14 | fn unused_fn() int { |
| 15 | return const_used_by_unused_fn |
| 16 | } |
| 17 | |
| 18 | pub fn pub_fn() int { |
| 19 | return helper_used_by_pub() |
| 20 | } |
| 21 | |
| 22 | $if never_defined ? { |
| 23 | const skipped_const = 4 |
| 24 | |
| 25 | fn skipped_fn() int { |
| 26 | return skipped_const |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | fn main() { |
| 31 | println(used_fn()) |
| 32 | } |
| 33 |