https://bugzilla.novell.com/show_bug.cgi?id=469244


           Summary: CS1525 Unexpected Symbol '?' incorrectly reported as
                    compilation error.
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.2.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1

A compilation error occurs when using a ternary operator with a Nullable class
instantiation using the 'xx?' construct instead of the Nullable<xx> construct.

Reproducible: Always

Steps to Reproduce:
1. instantiate a nullable type using the question mark form instead of the
angle brackets form inside of a ternary operator.
Actual Results:  
dev/mono/test.cs(19,62): error CS1525: Unexpected symbol `?'

Expected Results:  
The file should compile without errors.

In the attached file, the code causing the compilation error is indicated. As
you can see, instantiation of a Nullable type using ? by itself is not the
problem, nor is the ternary operator with the nullable type instantiated using
Nullable<> is not the problem.

This works in the Microsoft C# compiler.

-- 
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

Reply via email to