[Mono-bugs] [Bug 642437] New: Mono 2.8 Preview 6: gmcs regression -- spurious CS0227 error

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Sep 28 19:45:01 EDT 2010


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

https://bugzilla.novell.com/show_bug.cgi?id=642437#c0


           Summary: Mono 2.8 Preview 6: gmcs regression -- spurious CS0227
                    error
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.8.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: brian at sooloos.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User
           Blocker: ---


Description of Problem:

The following code, which compiles on mono 2.4.2.3, mono 2.6.7, and ms.net 3.5
is not compiling with mono 2.8 preview 6.

If I mark the struct as unsafe directly, the code compiles. It appears that the
nested struct is not picking up the 'unsafe' attribute from the enclosing class
as it should.

Steps to reproduce the problem:

brian at brianmbp ~ $ cat v.cs                                                     

unsafe class Baz {
    struct Foo {
        public Foo *next;
    }
}

class EntryPoint { public static void Main(string[] args) { } }

brian at brianmbp ~ $ gmcs --version
Mono C# compiler version 2.8.0.0

brian at brianmbp ~ $ gmcs /unsafe v.cs
v.cs(4,21): error CS0208: Cannot take the address of, get the size of, or
declare a pointer to a managed type `Baz.Foo'
v.cs(3,12): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings


Actual Results:

Compilation fails with CS0227


Expected Results:

Compilation Succeeds

How often does this happen? 

Every time I try to compile this code.

Additional Information:

N/A

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