Bug 311072 (MONO23758) - MCS currently ignores accessibility
Summary: MCS currently ignores accessibility
Status: RESOLVED MOVED
Alias: MONO23758
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-23 03:39 UTC by Mark Crichton
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 17:56:37 UTC


---- Reported by crichton@gimp.org 2002-04-22 20:39:59 MST ----

Description of Problem:
mcs currently ignores the accessibility of class methods (and maybe even
other non-top level types)

Steps to reproduce the problem:
Compile this conde with csc and mcs:


using System;


public class Block
{
        public int b1;
        protected int b2;
        internal int b3;
        private int b4;
        protected internal int b5;
        // This should be *private*
        int b6;
}       

public class Test 
{

        public static void Main() 
        {
                Block b = new Block();
                b.b1 = 1;
                b.b2 = 2;
                b.b3 = 3;
                b.b4 = 4;
                b.b5 = 5;
                b.b6 = 6;
        }
}

With csc, b2, b4, and b6 will be flagged as errors (you cannot access
them).  mcs gives no error.



---- Additional Comments From miguel@ximian.com 2002-04-22 23:01:41 MST ----



*** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO21147 ***


Unknown operating system unknown. Setting to default OS "Other".
This bug was marked DUPLICATE in the database it was moved from.
    Changing resolution to "MOVED"