Bugzilla – Bug 314687
[PATCH] mcs allows ref in an interface method implemented as out in a class
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by gonzalo@ximian.com 2004-05-12 21:40:14 MST ---- Try compiling this: ---- using System; interface X { void Hola (ref string name); } class Test : X { static void Main () { } public void Hola (out string name) { name = null; } } ----- Actual results: Compilation succedeed. Expected results: error.cs(6,7): error CS0535: 'Test' doesn't implement interface member 'X,Hola(ref string)' ---- Additional Comments From miguel@ximian.com 2004-11-02 01:52:30 MST ---- The problem on this bug is that we are passing Type [] to our pending implementation code, which has dropped the OUT information at that point. The fix is to move to use the ParameterData interface there instead of using the Type [] ---- Additional Comments From projectmonokochi@rediffmail.com 2005-03-17 07:37:40 MST ---- Created an attachment (id=166027) add Parameter.Modifier [][]mods for holding modifiers and initialze it with ParameterData ---- Additional Comments From rharinath@novell.com 2005-03-24 05:29:35 MST ---- Please attach a ChangeLog entry. I'll apply the patch once I test it. ---- Additional Comments From projectmonokochi@rediffmail.com 2005-03-25 07:37:27 MST ---- Created an attachment (id=166028) ChangeLog and Patch ---- Additional Comments From rharinath@novell.com 2005-04-07 09:48:50 MST ---- Applied to SVN. ---- Additional Comments From alp@atoker.com 2005-04-07 22:18:39 MST ---- 2005-04-08 Alp Toker <alp@atoker.com> * pending.cs: The fix to #58413 failed to compile methods implementing interfaces with/without params modifiers and vice versa, even though params modifiers aren't part of the signature. Make the modifier check less strict as in csc. Imported an attachment (id=166027) Imported an attachment (id=166028)