Bugzilla – Bug 324750
[PARSER] Does not parse cast to a generic nullable array
Last modified: 2008-09-09 07:32:28 UTC
---- Reported by patperry@stanford.edu 2007-07-11 15:44:55 MST ---- Description of Problem: gmcs fails to parse the explicit cast to (T?[]). Steps to reproduce the problem: 1. Try compiling the code below: using System; public class NullableArrayParseBug { public void Foo<T> () where T : struct { object o = null; int?[] intArray; T?[] array1; // this is ok Nullable<T>[] array2; // so is this array1 = (Nullable<T>[]) o; // this is ok intArray = (int?[]) o; // so is this array1 = (T?[]) o; // this is not ok } } Actual Results: NullableArrayParseBug.cs(18,21): error CS1002: Expecting `;' Compilation failed: 1 error(s), 0 warnings Expected Results: Should compile fine. How often does this happen? On Thursdays. Those are the days I compile the code above. Additional Information: ---- Additional Comments From marek.safar@seznam.cz 2007-08-02 10:04:00 MST ---- This one will be tricky. It looks like `(T?[])' is not recognized as a cast. Unknown operating system other. Setting to default OS "Other".
Fixed in SVN.