https://bugzilla.novell.com/show_bug.cgi?id=413418
Summary: Type conversion failure when using namespace alias and
generic type for variable declaration
Product: Mono: Compilers
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
Description of Problem:
Compiler has trouble with namespace aliases when generic types are involved.
Steps to reproduce the problem:
1. Try to compile the following code:
using scg = global::System.Collections.Generic;
using System.Collections.ObjectModel;
public class Test
{
scg::IList<string> x = new ReadOnlyCollection<string>(null);
static void Main(){} // Just to make compilation easy
}
Actual Results:
Test.cs(6,28): error CS0266: Cannot implicitly convert type
`System.Collections.
ObjectModel.ReadOnlyCollection<string>' to
`System.Collections.Generic.IList<T>'
An explicit conversion exists (are you missing a cast?)
Compilation failed: 1 error(s), 0 warnings
Expected Results:
Successful compilation.
How often does this happen?
Every time.
Additional Information:
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs