[registrar] Make sure we include the headers for NS[U]Integer / CGFloat to compile. Fixes #42673. (#465)
https://bugzilla.xamarin.com/show_bug.cgi?id=42673
This commit is contained in:
Родитель
9b3c97042d
Коммит
59aae5425f
|
@ -1696,6 +1696,11 @@ namespace XamCore.Registrar {
|
|||
if (!IsDualBuild)
|
||||
ns = type.Namespace.Substring (ns.IndexOf ('.') + 1);
|
||||
|
||||
CheckNamespace (ns, exceptions);
|
||||
}
|
||||
|
||||
void CheckNamespace (string ns, List<Exception> exceptions)
|
||||
{
|
||||
if (string.IsNullOrEmpty (ns))
|
||||
return;
|
||||
|
||||
|
@ -1952,9 +1957,15 @@ namespace XamCore.Registrar {
|
|||
case "System.Double": return "double";
|
||||
case "System.Boolean": return "BOOL"; // map managed 'bool' to ObjC BOOL = unsigned char
|
||||
case "System.Void": return "void";
|
||||
case "System.nint": return "NSInteger";
|
||||
case "System.nuint": return "NSUInteger";
|
||||
case "System.nfloat": return "CGFloat";
|
||||
case "System.nint":
|
||||
CheckNamespace ("Foundation", exceptions);
|
||||
return "NSInteger";
|
||||
case "System.nuint":
|
||||
CheckNamespace ("Foundation", exceptions);
|
||||
return "NSUInteger";
|
||||
case "System.nfloat":
|
||||
CheckNamespace ("CoreGraphics", exceptions);
|
||||
return "CGFloat";
|
||||
case "System.DateTime":
|
||||
throw ErrorHelper.CreateError (4102, "The registrar found an invalid type `{0}` in signature for method `{2}`. Use `{1}` instead.", "System.DateTime", IsDualBuild ? "Foundation.NSDate" : CompatNamespace + ".Foundation.NSDate", descriptiveMethodName);
|
||||
case "ObjCRuntime.Selector":
|
||||
|
|
Загрузка…
Ссылка в новой задаче