Bug 57095

Summary: generator: incorrect code generated for instance category properties
Product: iOS Reporter: Rolf Bjarne Kvinge [MSFT] <rolf>
Component: ToolsAssignee: Bugzilla <bugzilla>
Status: CONFIRMED ---    
Severity: normal CC: mono-bugs+monotouch, sebastien
Priority: Normal    
Version: master   
Target Milestone: Future Cycle (TBD)   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: No
Last known good build:

Description Rolf Bjarne Kvinge [MSFT] 2017-06-02 10:32:24 UTC
Test case:

[BaseType (typeof(NSObject))]
interface SomeCategory
	[Export ("someValue", ArgumentSemantic.Strong)]
	string SomeValue { get; }

generates code that doesn't compile:

> obj/Debug/ios/SomeCategory.g.cs(49,24): error CS0708: 'SomeCategory.SomeValue': cannot declare instance members in a static class

it seems that we should generate these as static (we generate methods as static), but for some reason we aren't.