|Summary:||Array doesn't implement non-generic IEnumerable|
|Product:||[Mono] Compilers||Reporter:||Jon Hughes <jon.hughes>|
|Component:||C#||Assignee:||Marek Safar <masafa>|
|Severity:||normal||CC:||alangley, alkpli, brendan.zagaeski, mono-bugs+mono, nberardi, peter.collins, shrutis, ulrike_axen|
|Tags:||BZRC8B4_C7SR1S1||Is this bug a regression?:||Yes|
|Last known good build:||Cycle 7 SR 1|
Description Jon Hughes 2016-09-16 02:04:41 UTC
Created attachment 17526 [details] repro project # Steps to reproduce Compile attached project. # Expected behaviour It compiles # Actual behaviour Compiler error: Error CS0029: Cannot implicitly convert type `int' to `System.Collections.IEnumerable' # Supplemental information Seems to work OK if you change any of the following * Remove nuget package Rx-Linq * Change PCL profile (The attached project is profile 78, it compiled for me on 136) * Change project type to native class library (worked for me in an iOS class library, which was relevant to the project where I discovered the issue) * Use Visual Studio 2015 Reproduces on 2 Macs in our office. # Test Environment === Xamarin Studio Enterprise === Version 6.1 (build 5441) Installation UUID: 55efec84-8d44-4ce0-824d-d80bea1a9ee2 Runtime: Mono 4.6.0 (mono-4.6.0-branch/746756c) (64-bit) GTK+ 2.24.23 (Raleigh theme) Package version: 406000245 === NuGet === Version: 126.96.36.199 === Xamarin.Profiler === Not Installed === Apple Developer Tools === Xcode 8.0 (11246) Build 8A218a === Xamarin.iOS === Version: 10.0.0.6 (Visual Studio Enterprise) Hash: 6c3fee4 Branch: xcode8 Build date: 2016-09-09 13:01:32-0400 === Xamarin.Mac === Version: 188.8.131.52 (Visual Studio Enterprise) === Xamarin.Android === Version: 184.108.40.206 (Visual Studio Enterprise) Android SDK: /Users/jonhughes/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 2.3 (API level 10) 4.0.3 (API level 15) 4.4 (API level 19) 5.0 (API level 21) 6.0 (API level 23) SDK Tools Version: 24.4.1 SDK Platform Tools Version: 23.0.1 SDK Build Tools Version: 23.0.1 Java SDK: /usr java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode) Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL === Xamarin Android Player === Version: 0.6.5 Location: /Applications/Xamarin Android Player.app === Build Information === Release ID: 601005441 Git revision: 68292d1ab289911c815ddc715dd7cc29a9752f9f Build date: 2016-09-09 04:43:23-04 Xamarin addins: ed25d008672663eeb9db55f1ccecb3c24d2fd3b2 Build lane: monodevelop-lion-cycle8 === Operating System === Mac OS X 10.12.0 Darwin <snip> 16.0.0 Darwin Kernel Version 16.0.0 Mon Aug 29 17:56:20 PDT 2016 root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64 === Enabled user installed addins === NuGet Package Management Extensions 0.11.1
Comment 1 Marek Safar 2016-09-16 11:07:46 UTC
*** Bug 44323 has been marked as a duplicate of this bug. ***
Comment 2 Marek Safar 2016-09-16 11:16:20 UTC
Fixed in master/Mono 4.8/Mono 4.6 SR1
Comment 3 Brendan Zagaeski (Xamarin Support) 2016-09-16 20:38:03 UTC
*** Bug 43838 has been marked as a duplicate of this bug. ***
Comment 4 Nick Berardi 2016-09-18 17:59:56 UTC
Could you provide a link to the patch?
Comment 5 Alexander Köplinger [MSFT] 2016-09-19 10:38:29 UTC
Comment 7 Brendan Zagaeski (Xamarin Support) 2016-09-19 23:29:45 UTC
If any user wishes to try an unofficial build based on the current Mono 4.6.0 branch rather than downgrading to Mono 4.4.0, the following build is available: https://bosstoragemirror.blob.core.windows.net/wrench/mono-4.6.0/8d/8d0eee7575928145f1e3d5b1e8e346cc22ab6ec9/MonoFramework-MDK-220.127.116.11.macos10.xamarin.universal.pkg Keep in mind that this specific build has had no formal testing or approval, so please use it at your own risk. This fix will also be formally included in the next Cycle 8 bug fix Service Release, which is tentatively scheduled for publication later this week (the week of September 19).
Comment 8 Shruti 2016-09-20 07:22:55 UTC
========================= Reproduce Status: ========================= I have checked this issue and successfully able to reproduce it on my end. I have used the builds mentioned in the comment0 and the test project from the bug comment: https://bugzilla.xamarin.com/show_bug.cgi?id=43838#c0 and observed the below error. Error: MainActivity.cs(31,31): error CS1929: Type `System.Array' does not contain a member `OfType' and the best extension method overload `System.Linq.Enumerable.OfType<TestLinq.MyTestEnum>(this System.Collections.IEnumerable)' requires an instance of type `System.Collections.IEnumerable' Supplement Info: Screencast: http://www.screencast.com/t/BGvkXqzJ4q9 Environment Info and IDE Logs: https://gist.github.com/shrutis360/4814064c84cba834e62da4e2e70798fa Build Output: https://gist.github.com/Shruti360/f2f6a87b4bcb5c902e05e3f1e0454026 ========================= Verification Status: ========================= I have verified this issue with latest C8SR0 builds, using the same test project and observe that this issue is fixed. Array successfully implement non-generic IEnumerable. Supplement Info: Screencast: http://www.screencast.com/t/OTkZmknatps Environment Info and IDE Logs: https://gist.github.com/shrutis360/74ad1047abf4f9c96699f92dc22f0962 Build Output: https://gist.github.com/Shruti360/e18ef73c761788d5ca3d59978d2ca14b Application Output: https://gist.github.com/Shruti360/af784c0144f036e12b4066a09df579d7 Hence, marking this issue as verified fixed. And please merge the fix into Cycle8. Thanks! Thanks!