Bug 57095 - generator: incorrect code generated for instance category properties
Summary: generator: incorrect code generated for instance category properties
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools (show other bugs)
Version: master
Hardware: PC Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-02 10:32 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2017-06-03 15:00 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: No
Last known good build:


Attachments

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

[Category]
[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.

Note You need to log in before you can comment on or make changes to this bug.