https://github.com/golota60/idas-bug here's a simple minimal reproduction of the issue. The error is on line 6-9, where the types always seem to be incompatible, no matter what I do
I'm using an external library to connect to a desk. Based on a condition, i want the "desk getter" function to either be get_instance or get_instance_by_mac cause I might have a MAC address or I might not. The errors jump between "incompatible types" to the fact that the compiler cannot know the size of a value upfront, so posting an exact error would be hard, cause applying one fix introduces a different error :/
The problem arises when i want to assign the result of one of these functions to a variable. I've tried Boxing them, converting to Closures and much more over the past few days, and at this point I am kinda helpless. Googling the errors points me to stuff that seem to have little relevance to my exact problem.
If someone could tell me how I can achieve this behavior and explain what is happening to me like I'm 5, I would be really grateful. Thanks in advance 🙂
