[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [bugs #11417] incompatible types in assignment: no con
From: |
James Michael DuPont |
Subject: |
[Pnet-developers] [bugs #11417] incompatible types in assignment: no conversion from `System.String' to `char *' |
Date: |
Fri, 31 Dec 2004 13:07:21 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 (Debian package 1.0-2) |
This mail is an automated notification from the bugs tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[bugs #11417] Latest Modifications:
Changes by:
James Michael DuPont <address@hidden>
'Date:
Fri 12/31/2004 at 13:07 (Europe/Berlin)
------------------ Additional Follow-up Comments ----------------------------
This error occurs when compiling mono mcs,
in ./class/corlib/System/String.cs
System/String.cs:1405: incompatible types in assignment: no conversion from
`System.String' to `char *'
System/String.cs:1409: invalid operands to binary `+'
System/String.cs:763: incompatible types in assignment: no conversion from
`System.String' to `char *'
System/String.cs:797: incompatible types in assignment: no conversion from
`System.String' to `char *'
/**************************************************************************/
[bugs #11417] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11417>
Project: DotGNU Portable.NET
Submitted by: James Michael DuPont
On: Tue 12/28/2004 at 17:13
Category: None
Severity: 5 - Average
Item Group: None
Resolution: None
Privacy: Public
Assigned to: None
Status: Open
Summary: incompatible types in assignment: no conversion from `System.String'
to `char *'
Original Submission: I dont know if this code is valid, but mono compiles it.
testcase1.cs:8: incompatible types in assignment: no conversion from
`System.String' to `char *'
class test
{
[NonSerialized] private char start_char;
internal unsafe void ToLowerInvariant ()
{
string tmp;
fixed (char* source = tmp); // problem, line 8
}
}
Follow-up Comments
------------------
-------------------------------------------------------
Date: Fri 12/31/2004 at 13:07 By: James Michael DuPont <mdupont>
This error occurs when compiling mono mcs,
in ./class/corlib/System/String.cs
System/String.cs:1405: incompatible types in assignment: no conversion from
`System.String' to `char *'
System/String.cs:1409: invalid operands to binary `+'
System/String.cs:763: incompatible types in assignment: no conversion from
`System.String' to `char *'
System/String.cs:797: incompatible types in assignment: no conversion from
`System.String' to `char *'
-------------------------------------------------------
Date: Tue 12/28/2004 at 17:28 By: Llewellyn Pritchard <leppie>
class test
{
internal unsafe void ToLowerInvariant ()
{
string tmp = "fooo";
fixed (char* source = tmp); // problem, line 8
char* bar = tmp;
}
}
This produces the following error on MS:
test.cs(8,13): error CS0029: Cannot implicitly convert type 'string' to 'char*'
It appears to allow implicit conversions of some types (maybe just string)
within the fixed initialization. It fails again when using it in the embedded
staements of the fixed context.
-------------------------------------------------------
Date: Tue 12/28/2004 at 17:24 By: Llewellyn Pritchard <leppie>
I have tested this with the MS C# compiler, and it does indeed allow that
implicit conversion, and its news to me!
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=11417>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/