Getting error of duplicate function but there is only one function with that name

I am getting an error that a function already exists, but if I remove/comment out that function, it shows that error because that function no longer exists.

So weird!! never faced this problem until Igor 9!!!!

error when trying to compile with the function ON When that Function is commented out!!!

Hmm... that seems indeed strange. Can you reduce your code to the minimal possible example where this happens and then post a self-contained experiment file here? I (seldomly) have weird compile issues which go away after restarting Igor, but I assume you tried this already?

This is just a bad error message; there is no duplicated function, the error message means to say "you can't use this function to assign to a WAVE reference:

function foo()
    String wname="wave1"
    WAVE w1 = sum_cycles(wname)
End
 
Function sum_cycles(String wname)
    return 1
End

(I'm assuming sum_cycles doesn't return a WAVE.)

This will be fixed in the next Nightly Build of Igor 10 today or tomorrow.