Bug 314687 (MONO58413) - [PATCH] mcs allows ref in an interface method implemented as out in a class
Summary: [PATCH] mcs allows ref in an interface method implemented as out in a class
Status: RESOLVED FIXED
Alias: MONO58413
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other All
: P3 - Medium : Normal
Target Milestone: ---
Assignee: daMONOguyz
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-13 04:40 UTC by Gonzalo Paniagua Javier
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
add Parameter.Modifier [][]mods for holding modifiers and initialze it with ParameterData (6.66 KB, patch)
2005-03-17 14:37 UTC, Thomas Wiest
Details | Diff
ChangeLog and Patch (7.28 KB, patch)
2005-03-25 14:37 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:37:34 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)