Created attachment 17526 [details]
# Steps to reproduce
Compile attached project.
# Expected behaviour
# 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
Mono 4.6.0 (mono-4.6.0-branch/746756c) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 406000245
=== NuGet ===
=== Xamarin.Profiler ===
=== Apple Developer Tools ===
Xcode 8.0 (11246)
=== Xamarin.iOS ===
Version: 10.0.0.6 (Visual Studio Enterprise)
Build date: 2016-09-09 13:01:32-0400
=== Xamarin.Mac ===
Version: 22.214.171.124 (Visual Studio Enterprise)
=== Xamarin.Android ===
Version: 126.96.36.199 (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:
=== Xamarin Android Player ===
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
=== Enabled user installed addins ===
NuGet Package Management Extensions 0.11.1
*** Bug 44323 has been marked as a duplicate of this bug. ***
Fixed in master/Mono 4.8/Mono 4.6 SR1
*** Bug 43838 has been marked as a duplicate of this bug. ***
Could you provide a link to the patch?
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:
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).
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'
Environment Info and IDE Logs: https://gist.github.com/shrutis360/4814064c84cba834e62da4e2e70798fa
Build Output: https://gist.github.com/Shruti360/f2f6a87b4bcb5c902e05e3f1e0454026
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.
Environment Info and IDE Logs:
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.
*** Bug 44510 has been marked as a duplicate of this bug. ***