Open giacomocavalieri opened 8 months ago
Yup! The current system isn't very good. I've been wanting to replace it with a proper call graph for ages but I've not got round to that yet.
I've not made an issue for it either, so let's use this one.
Cool! Do you already have an idea on how to do that? I'm really curious to learn how that's going to be implemented 👀
In this test the unused
variable should be marked as unused!
pub fn loop(cond: Bool, unused: Int) {
case cond {
True -> loop(False, unused)
False -> 1
}
}
I noticed that a private recursive function is not marked as unused. For example this one raises no warnings: