Bug 10803 - Wrong type reported when trying to assign to a fixed buffer
Summary: Wrong type reported when trying to assign to a fixed buffer
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2013-03-01 05:26 UTC by Piotr Zierhoffer
Modified: 2013-03-08 17:46 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Source presenting the bug (232 bytes, text/x-csharp)
2013-03-01 05:26 UTC, Piotr Zierhoffer
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Piotr Zierhoffer 2013-03-01 05:26:46 UTC
Created attachment 3518 [details]
Source presenting the bug

Description of Problem:
Trying to assign to a fixed buffer results with a CS0029 error, but it reports a wrong type of the field we're trying to assign to.
Visual Studio 2010 reports "char*", mcs reports "char".


Steps to reproduce the problem:
1. Compile the attached source with mcs -unsafe Program.cs


Actual Results:
Program.cs(14,15): error CS0029: Cannot implicitly convert type `char[]' to `char'


Expected Results:
Program.cs(14,15): error CS0029: Cannot implicitly convert type `char[]' to `char*'



How often does this happen? 
Always


Additional Information:
Mono C# compiler version 3.0.2.0
Gentoo Linux, 3.7.9 kernel
Comment 1 Marek Safar 2013-03-08 17:46:42 UTC
Fixed in master