Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I have a helper method which takes an Enum, and returns an IEnumerable of all the items in the enum type. However this causes an AOT crash when running on the device.
public static IEnumerable<string> GetStringList<T>() where T : struct, IConvertible
foreach(var e in EnumHelper.GetStringList<TestEnum>())
However if I replace the usage to something like this is works:
foreach(var e in Enum.GetValues(typeof(TestEnum)).Cast<TestEnum>().Select(x=>x.ToString()))
I added both tests case to our unit tests. Both variations works fine with 6.3.7 (beta)
The 6.3.x series has support for generics over value-types (including enums). It's still a beta but will soon become the next stable series for Xamarin.iOS.