mtouch.AssertError(4138,"The registrar cannot marshal the property type 'System.Object' of the property 'Foo.Bar10'.","testApp.cs",54);
mtouch.AssertError(4136,"The registrar cannot marshal the parameter type 'System.Object[]' of the parameter 'arg' in the method 'Foo.Bar1(System.Object[])'","testApp.cs",7);
mtouch.AssertError(4136,"The registrar cannot marshal the parameter type 'System.Object&' of the parameter 'arg' in the method 'Foo.Bar2(System.Object&)'","testApp.cs",12);
mtouch.AssertError(4136,"The registrar cannot marshal the parameter type 'System.Object&' of the parameter 'arg' in the method 'Foo.Bar3(System.Object&)'","testApp.cs",17);
mtouch.AssertError(4136,"The registrar cannot marshal the parameter type 'System.Object' of the parameter 'arg' in the method 'Foo.Bar4(System.Object)'","testApp.cs",23);
mtouch.AssertError(4104,"The registrar cannot marshal the return value of type `System.Object` in the method `Foo.Bar5()`.","testApp.cs",28);
mtouch.AssertError(4136,"The registrar cannot marshal the parameter type 'System.Nullable`1<System.Int32>' of the parameter 'arg' in the method 'Foo.Bar6(System.Nullable`1<System.Int32>)'","testApp.cs",34);
mtouch.AssertError(4104,"The registrar cannot marshal the return value of type `System.Nullable`1<System.Int32>` in the method `Foo.Bar7()`.","testApp.cs",39);
mtouch.AssertError(4136,"The registrar cannot marshal the parameter type 'System.Nullable`1<System.Int32>[]&' of the parameter 'arg' in the method 'Foo.Bar8(System.Nullable`1<System.Int32>[]&)'","testApp.cs",45);
mtouch.AssertError(4136,"The registrar cannot marshal the parameter type 'System.Attribute' of the parameter 'attribute' in the method 'Foo.Bar9(System.Attribute)'","testApp.cs",50);
mtouch.AssertError(4104,"The registrar cannot marshal the return value of type `System.Object[]` in the method `Foo.get_Bar11()`.","testApp.cs",58);
mtouch.AssertError(4136,"The registrar cannot marshal the parameter type 'System.Object[]' of the parameter 'value' in the method 'Foo.set_Bar11(System.Object[])'","testApp.cs",60);
".*/Test.cs(.*): error MT4102: The registrar found an invalid type `System.DateTime` in signature for method `DateMembers.F1`. Use `Foundation.NSDate` instead.",
".*/Test.cs(.*): error MT4102: The registrar found an invalid type `System.DateTime` in signature for method `DateMembers.F2`. Use `Foundation.NSDate` instead.",
".*/Test.cs(.*): error MT4102: The registrar found an invalid type `System.DateTime` in signature for method `DateMembers.F3`. Use `Foundation.NSDate` instead.");
".*/Test.cs(.*): error MT4117: The registrar found a signature mismatch in the method 'ArgCount.F1' - the selector 'F1' indicates the method takes 0 parameters, while the managed method has 1 parameters.",
".*/Test.cs(.*): error MT4117: The registrar found a signature mismatch in the method 'ArgCount.F2' - the selector 'F2:' indicates the method takes 1 parameters, while the managed method has 0 parameters.",
".*/Test.cs(.*): error MT4140: The registrar found a signature mismatch in the method 'ArgCount.F3' - the selector 'F3' indicates the variadic method takes 1 parameters, while the managed method has 0 parameters.");
}
[Test]
publicvoidMT4123()
{
varcode=@"
classArgCount:NSObject{
[Export (""F2"", IsVariadic = true)]
voidF2(System.IntPtrfoo){}
[Export (""F3"", IsVariadic = true)]
voidF3(intfoo){}
[Export (""F4:"", IsVariadic = true)]
voidF4(intfoo,IntPtrbar){}
}
";
Verify(R.Static,code,false,".*/Test.cs(.*): error MT4123: The type of the variadic parameter in the variadic function 'F3(System.Int32)' must be System.IntPtr.");
}
[Test]
publicvoidMT4127()
{
varstr1=@"
[Protocol]
interfaceIFoo1{
[Preserve (Conditional = true)]
[Export (""foo"")]
voidGetFoo();
}
[Protocol]
interfaceIFoo2{
[Preserve (Conditional = true)]
[Export (""foo"")]
voidGetFoo();
}
[Preserve ()]
classMyObjectErr:NSObject,IFoo1,IFoo2
{
publicvoidGetFoo()
{
thrownewNotImplementedException();
}
}
";
Verify(R.Static,str1,false,
"error MT4127: Cannot register more than one interface method for the method 'MyObjectErr.GetFoo' (which is implementing 'IFoo1.GetFoo' and 'IFoo2.GetFoo').");
}
[Test]
publicvoidMT4134()
{
if(!Directory.Exists(Configuration.xcode6_root))
Assert.Ignore("Xcode 6 ({0}) is required for this test.",Configuration.xcode6_root);
// This test will have to be updated when new frameworks are introduced.
"warning MT0079: The recommended Xcode version for Xamarin.iOS .* is Xcode .* or later. The current Xcode version .found in "+Configuration.xcode6_root+". is 6.*.",
"error MT4134: Your application is using the 'Contacts' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 9.0, while you're building with the iOS 8.0 SDK.) Please select a newer SDK in your app's iOS Build options.",
"error MT4134: Your application is using the 'CoreSpotlight' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 9.0, while you're building with the iOS 8.0 SDK.) Please select a newer SDK in your app's iOS Build options.",
"error MT4134: Your application is using the 'GameplayKit' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 9.0, while you're building with the iOS 8.0 SDK.) Please select a newer SDK in your app's iOS Build options.",
"error MT4134: Your application is using the 'MetalKit' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 9.0, while you're building with the iOS 8.0 SDK.) Please select a newer SDK in your app's iOS Build options.",
"error MT4134: Your application is using the 'ModelIO' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 9.0, while you're building with the iOS 8.0 SDK.) Please select a newer SDK in your app's iOS Build options.",
"error MT4134: Your application is using the 'MetalPerformanceShaders' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 9.0, while you're building with the iOS 8.0 SDK.) Please select a newer SDK in your app's iOS Build options.",
"error MT4134: Your application is using the 'WatchKit' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 8.2, while you're building with the iOS 8.0 SDK.) Please select a newer SDK in your app's iOS Build options.",
"error MT4134: Your application is using the 'ContactsUI' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 9.0, while you're building with the iOS 8.0 SDK.) Please select a newer SDK in your app's iOS Build options.",
"error MT4134: Your application is using the 'ReplayKit' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 9.0, while you're building with the iOS 8.0 SDK.) Please select a newer SDK in your app's iOS Build options.",
"error MT4134: Your application is using the 'WatchConnectivity' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 9.0, while you're building with the iOS 8.0 SDK.) Please select a newer SDK in your app's iOS Build options.");
".*Test.cs(.*): error MT4135: The member 'C.Bar' has an Export attribute without a selector. A selector is required.",
".*Test.cs(.*): error MT4135: The member 'C.Zap' has an Export attribute without a selector. A selector is required.");
}
[Test]
publicvoidMT4138()
{
varcode=@"
classC:NSObject{
[Export (""foo"")]
objectFoo{get{returnnull;}}
}
";
Verify(R.Static,code,false,
".*/Test.cs(.*): error MT4138: The registrar cannot marshal the property type 'System.Object' of the property 'C.Foo'.");
}
[Test]
publicvoidMT4139()
{
varcode=@"
classC:NSObject{
[Connect]
objectP1{get{returnnull;}}
[Connect]
intP2{get{return0;}}
}
";
Verify(R.Static,code,false,
".*/Test.cs(.*): error MT4139: The registrar cannot marshal the property type 'System.Object' of the property 'C.P1'. Properties with the .Connect. attribute must have a property type of NSObject (or a subclass of NSObject).",
".*/Test.cs(.*): error MT4139: The registrar cannot marshal the property type 'System.Int32' of the property 'C.P2'. Properties with the .Connect. attribute must have a property type of NSObject (or a subclass of NSObject).");
}
[Test]
publicvoidMT4141()
{
varcode=@"
classC:NSObject{
[Export (""retain"")]
newvoidRetain(){}
[Export (""release"")]
newvoidRelease(){}
[Export (""dealloc"")]
newvoidDealloc(){}
}
";
Verify(R.Static,code,false,
".*/Test.cs(.*): error MT4141: Cannot register the selector 'retain' on the member 'C.Retain' because Xamarin.iOS implicitly registers this selector.",
".*/Test.cs(.*): error MT4141: Cannot register the selector 'release' on the member 'C.Release' because Xamarin.iOS implicitly registers this selector.");
VerifyWithXode(R.Static,code,false,"error MT4145: Invalid enum 'Foo': enums with the [Native] attribute must have a underlying enum type of either 'long' or 'ulong'.");
VerifyWithXode(R.Static,code,true,"warning MT4146: The Name parameter of the Registrar attribute on the class 'C' (' C') contains an invalid character: ' ' (0x20).");
VerifyWithXode(R.Static,code,false,"error MT4146: The Name parameter of the Registrar attribute on the class 'C' ('A C') contains an invalid character: ' ' (0x20).");
"error MT4148: The registrar found a generic protocol: 'IProtocol`1'. Exporting generic protocols is not supported.",
"error MT4113: The registrar found a generic method: 'IProtocol2.M()'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes");
".*/Test.cs(.*): error MT4149: Cannot register the extension method 'Category.Foo' because the type of the first parameter ('System.Int32') does not match the category type ('Foundation.NSString').");
"error MT4150: Cannot register the type 'Category' because the category type 'System.String' in its Category attribute does not inherit from NSObject.");
".*/Test.cs(.*): error MT4158: Cannot register the constructor Category..ctor() in the category Category because constructors in categories are not supported.");
mtouch.AssertError(4160,$"Invalid character '{c}' (0x{((int)c).ToString ("x")}) found in selector 'X{c}' for 'TestInvalidChar.X{i}()'","testApp.cs",3+i*2);
".*/Test.cs(.*): error MT4161: The registrar found an unsupported structure 'FooA': All fields in a structure must also be structures (field 'Obj' with type 'Foundation.NSObject' is not a structure).",
".*/Test.cs(.*): error MT4161: The registrar found an unsupported structure 'FooB': All fields in a structure must also be structures (field 'Obj' with type 'Foundation.NSObject' is not a structure).",
".*/Test.cs(.*): error MT4161: The registrar found an unsupported structure 'FooC': All fields in a structure must also be structures (field 'Obj' with type 'Foundation.NSObject' is not a structure).",
".*/Test.cs(.*): error MT4161: The registrar found an unsupported structure 'FooD': All fields in a structure must also be structures (field 'Obj' with type 'Foundation.NSObject' is not a structure).",
".*/Test.cs(.*): error MT4111: The registrar cannot build a signature for type `FooE[]' in method `TestInvalidChar.Foo5`.",
".*/Test.cs(.*): error MT4111: The registrar cannot build a signature for type `FooF[]' in method `TestInvalidChar.Foo6`."
mtouch.AssertErrorPattern(4162,$"The type 'FutureType' (used as a base type of CurrentType) is not available in {name} .* (it was introduced in {name} 99.0.0): 'use Z instead'. Please build with a newer {name} SDK (usually done by using the most recent version of Xcode).",custom_pattern_syntax:true);
mtouch.AssertErrorPattern(4162,$"The type 'FutureType' (used as a base type of CurrentType) is not available in {name} .* (it was introduced in {name} 89.0.0). Please build with a newer {name} SDK (usually done by using the most recent version of Xcode).",custom_pattern_syntax:true);
mtouch.AssertErrorPattern(4162,$"The type 'FutureType' (used as the property type of CurrentType.Zap) is not available in {name} .* (it was introduced in {name} 99.0.0): 'use Z instead'. Please build with a newer {name} SDK (usually done by using the most recent version of Xcode).","testApp.cs",custom_pattern_syntax:true);
mtouch.AssertErrorPattern(4162,$"The type 'FutureType' (used as the property type of CurrentType.Zap) is not available in {name} .* (it was introduced in {name} 89.0.0). Please build with a newer {name} SDK (usually done by using the most recent version of Xcode).","testApp.cs",custom_pattern_syntax:true);
mtouch.AssertErrorPattern(4162,$"The type 'FutureType' (used as a parameter in CurrentType.Foo) is not available in {name} .* (it was introduced in {name} 99.0.0): 'use Z instead'. Please build with a newer {name} SDK (usually done by using the most recent version of Xcode).","testApp.cs",custom_pattern_syntax:true);
mtouch.AssertErrorPattern(4162,$"The type 'FutureType' (used as a parameter in CurrentType.Foo) is not available in {name} .* (it was introduced in {name} 89.0.0). Please build with a newer {name} SDK (usually done by using the most recent version of Xcode).","testApp.cs",custom_pattern_syntax:true);
mtouch.AssertErrorPattern(4162,$"The type 'FutureType' (used as a return type in CurrentType.Bar) is not available in {name} .* (it was introduced in {name} 99.0.0): 'use Z instead'. Please build with a newer {name} SDK (usually done by using the most recent version of Xcode).","testApp.cs",custom_pattern_syntax:true);
mtouch.AssertErrorPattern(4162,$"The type 'FutureType' (used as a return type in CurrentType.Bar) is not available in {name} .* (it was introduced in {name} 89.0.0). Please build with a newer {name} SDK (usually done by using the most recent version of Xcode).","testApp.cs",custom_pattern_syntax:true);
mtouch.AssertError(4164,$"Cannot export the property 'X{kw}' because its selector '{kw}' is an Objective-C keyword. Please use a different name.","testApp.cs");
mtouch.AssertError(4168,$"Cannot register the type 'X{kw}' because its Objective-C name '{kw}' is an Objective-C keyword. Please use a different name.");
mtouch.AssertError(4169,$"Failed to generate a P/Invoke wrapper for objc_msgSend(System.Object): The registrar cannot get the ObjectiveC type for managed type `System.Object`.");
mtouch.AssertError(4170,"The registrar can't convert from 'System.DateTime' to 'Foundation.NSNumber' for the return value in the method NS.X.A.","testApp.cs",9);
mtouch.AssertError(4170,"The registrar can't convert from 'System.Nullable`1<System.DateTime>' to 'Foundation.NSNumber' for the return value in the method NS.X.B.","testApp.cs",12);
mtouch.AssertErrorCount(4/* errors are duplicated */);
mtouch.AssertError(4138,"The registrar cannot marshal the property type 'System.ConsoleColor' of the property 'NS.X.E'.","testApp.cs",23);
mtouch.AssertError(4138,"The registrar cannot marshal the property type 'System.Nullable`1<System.ConsoleColor>' of the property 'NS.X.F'.","testApp.cs",27);
mtouch.AssertError(4171,"The BindAs attribute on the parameter #1 is invalid: the BindAs type System.DateTime is different from the parameter type System.ConsoleColor.","testApp.cs",8);
mtouch.AssertError(4171,"The BindAs attribute on the parameter #1 is invalid: the BindAs type System.Nullable`1<System.DateTime> is different from the parameter type System.Nullable`1<System.ConsoleColor>.","testApp.cs",11);
mtouch.AssertError(4171,"The BindAs attribute on the return value of the method NS.X.C is invalid: the BindAs type System.DateTime is different from the return type System.ConsoleColor.","testApp.cs",15);
mtouch.AssertError(4171,"The BindAs attribute on the return value of the method NS.X.D is invalid: the BindAs type System.Nullable`1<System.DateTime> is different from the return type System.Nullable`1<System.ConsoleColor>.","testApp.cs",19);
mtouch.AssertErrorCount(8/* 2 errors are duplicated */);
mtouch.AssertError(4172,"The registrar can't convert from 'System.DateTime' to 'Foundation.NSNumber' for the parameter 'value' in the method NS.X.A.","testApp.cs",8);
mtouch.AssertError(4172,"The registrar can't convert from 'System.Nullable`1<System.DateTime>' to 'Foundation.NSNumber' for the parameter 'value' in the method NS.X.B.","testApp.cs",10);
mtouch.AssertError(4172,"The registrar can't convert from 'System.Nullable`1<System.Int32>[]' to 'Foundation.NSNumber[]' for the parameter 'value' in the method NS.X.D.","testApp.cs",12);
mtouch.AssertError(4172,"The registrar can't convert from 'System.Int32&' to 'Foundation.NSNumber' for the parameter 'value' in the method NS.X.E.","testApp.cs",14);
mtouch.AssertError(4172,"The registrar can't convert from 'System.Int32&' to 'Foundation.NSNumber' for the parameter 'value' in the method NS.X.F.","testApp.cs",16);
mtouch.AssertError(4172,"The registrar can't convert from 'System.Int32[0...,0...]' to 'Foundation.NSNumber[,]' for the parameter 'value' in the method NS.X.G.","testApp.cs",18);
mtouch.AssertError(4172,"The registrar can't convert from 'System.Nullable`1<System.Int32>[0...,0...]' to 'Foundation.NSNumber[,]' for the parameter 'value' in the method NS.X.H.","testApp.cs",20);
mtouch.AssertError(4172,"The registrar can't convert from 'NS.E' to 'Foundation.NSString' for the parameter 'value' in the method NS.EClass.A.","testApp.cs",27);
mtouch.AssertError(4172,"The registrar can't convert from 'System.Nullable`1<NS.E>[]' to 'Foundation.NSString[]' for the parameter 'value' in the method NS.EClass.D.","testApp.cs",29);
mtouch.AssertError(4174,"Unable to locate the block to delegate conversion method for the method NS.Consumer.ResolveRecipients's parameter #2.","testApp.cs",11);
if(line.Contains("warning: method 'paymentAuthorizationViewController:didAuthorizePayment:handler:' in protocol 'PKPaymentAuthorizationViewControllerDelegate' not implemented [-Wprotocol]"))
continue;// Xcode 9 beta 1: this method changed from optional to required.
Assert.IsTrue(success,string.Format("Expected '{0}' to show the error(s) '{1}' with --registrar:\n\t{2}",code,string.Join("\n\t",expected_messages),value.ToString().ToLower()));
actual_messages.Remove(".*Test.app built successfully.");
actual_messages.Remove("Xamarin.iOS .* using.*");
actual_messages.Remove("warning MT5303: Native linking warning: warning: relocatable dylibs (e.g. embedded frameworks) are only supported on iOS 8.0 and later .*");
actual_messages.Remove("warning MT5303: Native linking warning: warning: embedded dylibs/frameworks are only supported on iOS 8.0 and later (@rpath/PushKit.framework/PushKit)");
actual_messages.ExceptWith(exp_messages);
exp_messages.ExceptWith(split);
vartext=newStringBuilder();
foreach(varainactual_messages)
text.AppendFormat("Unexpected error/warning with --registrar:{0}:\n\t{1}\n",value.ToString().ToLower(),a);
foreach(varainexp_messages)
text.AppendFormat("Expected with --registrar:{0} to show:\n\t{1}\n",value.ToString().ToLower(),a);
".*Test.cs.*: error MT4132: The registrar found an invalid generic return type 'V' in the property 'Open`2.FooZap'. The return type must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4132: The registrar found an invalid generic return type 'V' in the property 'Open`2.Bar'. The return type must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4128: The registrar found an invalid generic parameter type 'V' in the parameter arg of the method 'Open`2.Foo(V)'. The generic parameter must have an 'NSObject' constraint.");
".*Test.cs.*: error MT4131: The registrar cannot export static properties in generic classes ('Open`1.Zap').",
".*Test.cs.*: error MT4130: The registrar cannot export static methods in generic classes ('Open`1.Foo()').",
".*Test.cs.*: error MT4130: The registrar cannot export static methods in generic classes ('Open`1.Foo(U)').");
}
[Test]
publicvoidNestedGenericType()
{
varcode=@"
classParent<T>{
publicclassNested:NSObject{
[Export (""foo:"")]
publicvoidFoo(Tfoo){
}
}
}
";
Verify(R.Static,code,false,
".*Test.cs.*: error MT4128: The registrar found an invalid generic parameter type 'T' in the parameter foo of the method 'Parent`1/Nested.Foo(T)'. The generic parameter must have an 'NSObject' constraint.");
}
[Test]
publicvoidGenericType_WithDerivedClosedOverride()
{
varcode=@"
classGenericTestClass<T>:NSObject
{
[Export (""arg1:"")]
publicvirtualvoidArg1(Tt){}
}
classDerivedClosed:GenericTestClass<UIView>
{
publicoverridevoidArg1(UIViewt){}
}
";
Verify(R.Static,code,false,
".*Test.cs.*: error MT4128: The registrar found an invalid generic parameter type 'T' in the parameter t of the method 'GenericTestClass`1.Arg1(T)'. The generic parameter must have an 'NSObject' constraint.");
mtouch.AssertError(4136,"The registrar cannot marshal the parameter type 'System.Collections.Generic.List`1<U>' of the parameter 'arg' in the method 'Open`1.Bar(System.Collections.Generic.List`1<U>)'","testApp.cs",7);
".*Test.cs.*: error MT4132: The registrar found an invalid generic return type 'U' in the property 'Open`1.BarZap'. The return type must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4132: The registrar found an invalid generic return type 'U' in the property 'Open`1.F1'. The return type must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4132: The registrar found an invalid generic return type 'System.Collections.Generic.List`1<System.Collections.Generic.List`1<U>>' in the property 'Open`1.F2'. The return type must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4132: The registrar found an invalid generic return type 'System.Action`1<U>' in the property 'Open`1.F3'. The return type must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4128: The registrar found an invalid generic parameter type 'U' in the parameter arg of the method 'Open`1.Bar(U)'. The generic parameter must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4128: The registrar found an invalid generic parameter type 'U[]' in the parameter arg of the method 'Open`1.Zap(U[])'. The generic parameter must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4129: The registrar found an invalid generic return type 'U' in the method 'Open`1.XyZ()'. The generic return type must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4129: The registrar found an invalid generic return type 'System.Action`1<U>' in the method 'Open`1.ZapBar()'. The generic return type must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4128: The registrar found an invalid generic parameter type 'System.Action`1<U>' in the parameter f of the method 'Open`1.XyZ(System.Action`1<U>)'. The generic parameter must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4128: The registrar found an invalid generic parameter type 'System.Collections.Generic.List`1<System.Collections.Generic.List`1<System.Collections.Generic.List`1<System.Collections.Generic.List`1<U>>>>' in the parameter f of the method 'Open`1.FooZap(System.Collections.Generic.List`1<System.Collections.Generic.List`1<System.Collections.Generic.List`1<System.Collections.Generic.List`1<U>>>>)'. The generic parameter must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4129: The registrar found an invalid generic return type 'System.Collections.Generic.List`1<System.Collections.Generic.List`1<U>>' in the method 'Open`1.ZapBoo()'. The generic return type must have an 'NSObject' constraint."
".*Test.cs.*: error MT4128: The registrar found an invalid generic parameter type 'U&' in the parameter arg of the method 'Open`1.Bar(U&)'. The generic parameter must have an 'NSObject' constraint.",
".*Test.cs.*: error MT4128: The registrar found an invalid generic parameter type 'U[]&' in the parameter arg of the method 'Open`1.Zap(U[]&)'. The generic parameter must have an 'NSObject' constraint.");
mtouch.AssertError(4113,"The registrar found a generic method: 'GenericMethodClass.Foo(T)'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes","testApp.cs",6);
mtouch.AssertError(4113,"The registrar found a generic method: 'GenericMethodClass.GenericMethod(T)'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes","testApp.cs",8);
mtouch.AssertWarning(4174,"Unable to locate the block to delegate conversion method for the method GenericMethodClass.Foo's parameter #1.","testApp.cs",5);
mtouch.AssertError(4113,"The registrar found a generic method: 'NullableGenericTestClass`1.Z1(System.Nullable`1<Z>)'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes","testApp.cs",12);
mtouch.AssertError(4113,"The registrar found a generic method: 'NullableGenericTestClass`1.Z2()'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes","testApp.cs",17);
mtouch.AssertError(4113,"The registrar found a generic method: 'NullableGenericTestClass`1.Z3(Z)'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes","testApp.cs",23);
mtouch.AssertError(4128,"The registrar found an invalid generic parameter type 'T' in the parameter foo of the method 'NullableGenericTestClass`1.T1(T)'. The generic parameter must have an 'NSObject' constraint.","testApp.cs",28);
mtouch.AssertError(4128,"The registrar found an invalid generic parameter type 'System.Nullable`1<T>' in the parameter foo of the method 'NullableGenericTestClass`1.T2(System.Nullable`1<T>)'. The generic parameter must have an 'NSObject' constraint.","testApp.cs",33);
mtouch.AssertError(4129,"The registrar found an invalid generic return type 'T' in the method 'NullableGenericTestClass`1.T3()'. The generic return type must have an 'NSObject' constraint.","testApp.cs",38);
mtouch.AssertError(4136,"The registrar cannot marshal the parameter type 'System.Nullable`1<T>' of the parameter 'foo' in the method 'NullableGenericTestClass`1..ctor(System.Nullable`1<T>)'","testApp.cs",6);
publicvirtualXFoo1<X>(intx)whereX:NSObject{returndefault(X);}// Not OK
[Export (""fooX2:"")]
publicvirtualXFoo2<X>(intx){returndefault(X);}// Not OK
[Export (""fooX3:"")]
publicvoidFoo3<X>(Xx){}// Not OK
}
";
Verify(R.Static,code,false,
".*Test.cs.*: error MT4113: The registrar found a generic method: 'G.Foo1(System.Int32)'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes",
".*Test.cs.*: error MT4113: The registrar found a generic method: 'G.Foo2(System.Int32)'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes",
".*Test.cs.*: error MT4113: The registrar found a generic method: 'G.Foo3(X)'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes");