Bug 27428 - btouch generated files don't qualify all references to Messaging class
Summary: btouch generated files don't qualify all references to Messaging class
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: XI 8.6.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Alex Soto [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-02-25 14:21 UTC by Dave Dunkin
Modified: 2015-03-05 13:07 UTC (History)
2 users (show)

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


Attachments
Project demonstrating the compile error (3.58 KB, application/zip)
2015-02-25 14:21 UTC, Dave Dunkin
Details


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 Dave Dunkin 2015-02-25 14:21:02 UTC
Created attachment 10032 [details]
Project demonstrating the compile error

All references to the Messaging class in btouch generated files should use a globally qualified namespace, e.g. global::BindingBugs.Messaging in the snippet below. Failing to use the correct namespace can cause compile errors if the binding api filename is the same as the last segment of the namespace.


namespace Foo.BindingBugs {
	[Register("Widget", true)]
	public unsafe partial class Widget : NSObject {
		[Export ("doSomething:atIndex:")]
		[CompilerGenerated]
		public virtual void DoSomething (NSObject object_, int index)
		{
			if (object_ == null)
				throw new ArgumentNullException ("object_");
			if (IsDirectBinding) {
				BindingBugs.Messaging.void_objc_msgSend_IntPtr_int (this.Handle, Selector.GetHandle ("doSomething:atIndex:"), object_.Handle, index);
			} else {
				BindingBugs.Messaging.void_objc_msgSendSuper_IntPtr_int (this.SuperHandle, Selector.GetHandle ("doSomething:atIndex:"), object_.Handle, index);
			}
		}
	}
}
Comment 1 Alex Soto [MSFT] 2015-03-05 13:07:17 UTC
Fixed in maccore master 6b51db11b064ceb957ca6fb1c1a2244c73482933

@Dave thanks for the report!

@QA included test in same commit