https://bugzilla.novell.com/show_bug.cgi?id=373190
Summary: (g)mcs always emits static properties
Product: Mono: Compilers
Version: SVN
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
When a given property is an instance property, then (g)mcs correctly emits
instance accessors but the property itself is still static.
To fix this for gmcs, we need use the DefineProperty overload that takes a
CallingConventions argument. This property was introduced in .NET 2.0 SP1. For
mcs, we'll need to use reflection to invoke an internal method.
To reproduce, compile the following code (using /target:library) and then
disassembly it:
public class Foo
{
public bool A {
get { return false; }
}
public static bool B {
get { return false; }
}
}
Expected result:
property instance bool A()
{
.get instance bool Foo::get_A()
}
property bool B()
{
.get bool Foo::get_B()
}
Actual result:
property bool A()
{
.get instance bool Foo::get_A()
}
property bool B()
{
.get bool Foo::get_B()
}
--
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs