[Mono-bugs] [Bug 421838] New: CS0188 is not triggered by properties

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Sep 1 02:25:07 EDT 2008


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


           Summary: CS0188 is not triggered by properties
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: lunchtimemama at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Test case:

public struct Test

{

    private int x;

    private int y;

    public Test(int x, int y)

    {

        X = x;

        Y = y;

    }



    public int X

    {

        get { return x; }

        set { x = value; }

    }



    public int Y

    {

        get { return y; }

        set { y = value; }

    }

}

Actual result:
It compiles.

Excepted result:
Compilation should fail with the error [The 'this' object cannot be used before
all of its fields are assigned to(CS0188)]. This is how csc behaves.


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


More information about the mono-bugs mailing list