Bug 57537 - [generator] BindAs support on Fields
Summary: [generator] BindAs support on Fields
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: XI 10.99 (xcode9)
Hardware: PC Mac OS
: Normal enhancement
Target Milestone: Xcode9
Assignee: Alex Soto [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-06-15 21:07 UTC by Vincent Dondain [MSFT]
Modified: 2017-06-21 15:26 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Vincent Dondain [MSFT] 2017-06-15 21:07:50 UTC
In ARKit, on ARSCNDebugOptions we have a great case of how `BindAs` could be used if only it supported Fields.

See: https://github.com/xamarin/xamarin-macios/pull/2187/files#r120884394

Right now this is not the case and trying to use BindAs does nothing (not even generate a warning in this case).
Comment 1 Alex Soto [MSFT] 2017-06-15 21:12:33 UTC
I think FieldAttribute should support enums by itself
Comment 2 Rolf Bjarne Kvinge [MSFT] 2017-06-16 07:46:22 UTC
I agree with Alex, FieldAttribute should support enums.

It should also look at the [Native] attribute of the enum to make sure we use the right size.
Comment 3 Alex Soto [MSFT] 2017-06-20 16:25:36 UTC
PR: https://github.com/xamarin/xamarin-macios/pull/2230
Comment 4 Alex Soto [MSFT] 2017-06-21 15:26:44 UTC
fixed in xamarin-macios/xcode9 @ 3c5221b2142feaca295adc098bdab3e96b48ed1b

No BindAs attribute needed, FieldAttribute now supports enums all by itself