Careful if you use consts inside your methods. This is a common way in .NET to avoid magic numbers and get the performance benefit of const operations without cluttering your fields and intellisense.
Is this a known issue that is being fixed? Could cause some pretty nasty bugs.
as you realized thats a dot net behavior so if it goes wrong its a mono 1.2.5 bug and nothing unity could even impact (mono 1.2.5 had quite a few bugs)
Unity 3 uses Mono 2.6+, which has a much more solid compiler that will throw errors on incorrect syntax and alike and in relation to handling like this
Right there are workarounds, the issue at hand is that folks will write this code and expect it to work…and it’s a difficult problem to solve - especially since you have to reply on Debug.write instead of a proper step-through debugger. (Yeah, I know, 3.0).
Which is still wrong, but wrong in a different way, which is interesting. Using “-variation” made the constant negative in my case. Not very constant if you ask me…
I actually reported this bug to Mono some time ago and they eventually got back to confirm it had been fixed. It’s just that Unity hasn’t updated the C# compiler since then (until version 3.0).