[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: |
Llewellyn Pritchard |
Subject: |
[Pnet-developers] [bugs #11417] incompatible types in assignment: no conversion from `System.String' to `char *' |
Date: |
Tue, 28 Dec 2004 17:28:49 +0000 (UTC) |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; FDM; .NET CLR 2.0.41013) |
This mail is an automated notification from the bugs tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[bugs #11417] Latest Modifications:
Changes by:
Llewellyn Pritchard <address@hidden>
'Date:
Tue 12/28/2004 at 17:28 (GMT)
------------------ Additional Follow-up Comments ----------------------------
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.
/**************************************************************************/
[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: 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/