[Mono-bugs] [Bug 391750] New: gmcs throws "does not exist (CS0103)" compile error when a public event is used within it's own generic class.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat May 17 04:41:01 EDT 2008


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

User ryancassar at gmail.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=391750#c360455

           Summary: gmcs throws "does not exist (CS0103)" compile error when
                    a public event is used within it's own generic class.
           Product: Mono: Compilers
           Version: 1.9.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: ryancassar at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=216162)
 --> (https://bugzilla.novell.com/attachment.cgi?id=216162)
Test case to reproduce the compiler bug.

Description of Problem:
Attempting to refer to a public event in a generic class from within the class
is considered a compile error. Referencing the same event outside the class
appears to work as expected.

Steps to reproduce the problem:
1. Compile test.cs with "gcms test.cs"
2. Observe compile errors.

Actual Results:
test.cs(11,25): error CS0103: The name `Evt' does not exist in the current
context
Compilation failed: 1 error(s), 0 warnings

Expected Results:
Successful compilation.

How often does this happen? 
Always.

Additional Information:
May be closely related to [Bug #360455], as if the add/remove accessors are
commented out, the CS0067 warning is raised as in that bug. This however is
more serious effect as it generates an compile error where it should not.
Removing the generic parts of BugClass allows the class to compile
successfully.
Compiles successfully with and without the genericness and add/remove accessors
in VS2008.
Confirmed in version 1.9.2 on OSX, 1.9.2 on Windows XP and 1.2.6 on Ubuntu.


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