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


           Summary: gmcs doesn't emit CS0188 errors
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
          Found By: ---


Repro:

using System;

struct Foo {

        int bar;
        int baz;

        public int Bar {
                get { return bar; }
        }

        public Foo (int baz)
        {
                this.baz = baz;
                bar = Bar - 1;
        }
}

Result:
repro.cs(6,13): warning CS0414: The private field `Foo.baz' is assigned but its
value is never used
Compilation succeeded - 1 warning(s)

Expected:
error CS0188: The 'this' object cannot be used before all of its fields are
assigned to.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to