https://bugzilla.novell.com/show_bug.cgi?id=430804
User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=430804#c6 --- Comment #6 from Jon Burgoyne <[EMAIL PROTECTED]> 2008-11-12 11:28:29 MST --- What I find strange is that this behavior only occurs for static readonly fields. If you try the above tests with non-static readonly fields, it works, which means those fields aren't applying the same "readonly" behavior has their static counterparts. Why don't we do the same optimization for non-static readonly fields? I suspect the reason is that it would break all sorts of dependency injection and mocking toolkits and paradigms. If you want to use dependency injection, it works by setting these values via reflection. If references to those values were optimized to contain the original readonly value, then dependency injection wouldn't work. Which is why I still think this bug is valid. It's valid to do dependency injection on static fields, but it won't work because of this issue. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs