[Mono-bugs] [Bug 614955] New: ternary if in default parameter value fails

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 16 18:49:12 EDT 2010



           Summary: ternary if in default parameter value fails
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: rkvinge at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

test code:

public class D {
  const D x = null;
  static public explicit operator int (D d = true ? x : x){
    return 0;

dmcs fails with:
test.cs(3,57): error CS1041: Identifier expected: `?' is a keyword

csc (VS2010) succeeds with a warning:
test.cs(3,39): warning CS1066: The default value specified for parameter 'd'
        have no effect because it applies to a member that is used in contexts
        that do not allow optional arguments

Configure bugmail: http://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.

More information about the mono-bugs mailing list