diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2006-04-20 17:03:42 +0400 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2006-04-20 17:03:42 +0400 |
commit | 30d127efd57df5af1106c5744f110669f932f43a (patch) | |
tree | fd6037297b4f7c315ed8bf6e43aafb24c42b44a2 /mcs/errors/cs1502-7.cs | |
parent | 8875ef90ff289b4b632db274b32b42b8bccc4d3f (diff) |
Fix #75800
* mcs/expression.cs (Invocation.VerifyArgumentsCompat): Don't try
implicit conversions on 'out' and 'ref' arguments.
* gmcs/expression.cs: Likewise.
* errors/cs1502-7.cs: New test from #75800.
svn path=/trunk/mcs/; revision=59696
Diffstat (limited to 'mcs/errors/cs1502-7.cs')
-rw-r--r-- | mcs/errors/cs1502-7.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mcs/errors/cs1502-7.cs b/mcs/errors/cs1502-7.cs new file mode 100644 index 00000000000..e25806807af --- /dev/null +++ b/mcs/errors/cs1502-7.cs @@ -0,0 +1,28 @@ +// cs1502-7.cs: The best overloaded method match for `TestCase.TestS(ref object)' has some invalid arguments +// Line: 21 + +using System; + +public struct Struct { + public int x, y, z; +} + +public class TestCase { + + public static void Main() { + + Struct s = new Struct(); + + s.x = 1; + s.y = 2; + + System.Console.WriteLine("{0} {1} {2}", s.x, s.y, s.z); + + TestS(ref s); + } + + public static void TestS(ref object ino) { + System.Console.WriteLine("{0}", ((Struct)(ino)).x); + } + +} |