Bug 35535

Summary: CS0425 Consider using an explicit interface implementation instead error on XS only
Product: [Mono] Compilers Reporter: John Miller [MSFT] <john.miller>
Component: C#Assignee: Marek Safar <masafa>
Severity: normal CC: mono-bugs+mono, mono-bugs+monodevelop
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Sample Project

Description John Miller [MSFT] 2015-11-04 11:38:08 UTC
Created attachment 13669 [details]
Sample Project


    The attached sample code does not compile when using Xamarin Studio on Mac. It will compile in Visual Studio. 

**Steps to Reproduce:**

   Build the iOS project in XS on a Mac.

**Actual Results:**

   Error CS0425: The constraints for type parameter `T1' of method `CS425Test.iOS.TestClass.Clone<T1>()' must match the constraints for type parameter `T1' of interface method `CS425Test.iOS.TestInterface<CS425Test.iOS.TestInterface2>.Clone<T1>()'. Consider using an explicit interface implementation instead (CS0425) (CS425Test.iOS)

**Expected Results:**

   No errors. 

**Build Date & Platform:**

=== Xamarin Studio ===

Version 5.10 (build 860)
Installation UUID: e01c3049-a2d2-4e0a-aad8-afe6fb627c4d
	Mono 4.2.1 (explicit/8862921)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010091

=== Xamarin.Profiler ===

Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 7.0 (8227)
Build 7A220

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 9ce9e8b
Branch: master
Build date: 2015-10-28 19:11:03-0400

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/johnmiller/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		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.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.2
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 510000860
Git revision: 7c46a0b709d51ad5d5a5ed90a4671cc7b6928e62
Build date: 2015-10-29 17:17:52-04
Xamarin addins: b9337905aca5dc276190d78819728a59cda33a43
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.10.5

**Additional Information:**

The workaround is to implement this explicitly:

        T1 TestInterface<TestInterface2>.Clone<T1>()
            return (T1) Clone();
Comment 1 Marek Safar 2015-11-10 08:07:00 UTC
Fixed in master