Bug 321356 (MONO78630) - [GMCS] Switch on nullable types
Summary: [GMCS] Switch on nullable types
Status: RESOLVED FIXED
Alias: MONO78630
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-13 14:38 UTC by Sanghyeon Seo
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:01:17 UTC


---- Reported by sanxiyn@gmail.com 2006-06-13 07:38:03 MST ----

Steps to reproduce the problem:

public class test {
    public static void Main(string[] args) {
        int? a = 0;
        switch (a) {
            case 0:
                System.Console.WriteLine("0");
                break;
        }
    }
}

Actual Results:

test.cs(4,9): error CS0151: A value of an integral type or string expected
for switch

Expected Results:

It should compile it fine. (csc does.)



---- Additional Comments From vargaz@gmail.com 2006-06-13 09:35:49 MST ----

Also, this blocks recent IronPython snapshots from compiling on mono.




---- Additional Comments From martin@ximian.com 2006-06-15 18:32:54 MST ----

Fixed in SVN.


Unknown operating system unknown. Setting to default OS "Other".