[Mono-bugs] [Bug 462950] New: gmcs fails to compile class with explicit implementations of properties

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 30 10:02:06 EST 2008


           Summary: gmcs fails to compile class with explicit
                    implementations of properties
           Product: Mono: Compilers
           Version: SVN
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: markus.johnsson.84 at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

When using automatic property implementation, and the property is a second
explicit implementation of an interface property with generic type, the gmcs
compiler fails, while Microsoft's compiler works fine:

$ cat bug.cs

class A {}
class B {}

interface I<T>
  T Prop { get; set; }

class C: I<A>, I<B>
  A I<A>.Prop { get; set; }
  B I<B>.Prop { get; set; }

class Program
  static void Main(string [] args)
    C c = new C();

$ gmcs bug.cs
bug.cs(13,10): error CS0102: The type `C' already contains a definition for
bug.cs(12,10): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings

$ mono -V
Mono JIT compiler version 2.3 (/trunk/mono r122238 tue dec 30 15:39:17 CET
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none

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