Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/bgen/AttributeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ IEnumerable<T> CreateAttributeInstance<T> (CustomAttributeData attribute, ICusto
return convertedAttributes.OfType<T> ();

var expectedType = ConvertTypeToMeta (typeof (T), provider);
if (attribute.GetAttributeType () != expectedType && !IsSubclassOf (expectedType, attribute.GetAttributeType ()))
if (attribute.GetAttributeType () != expectedType && !attribute.GetAttributeType ().IsSubclassOf (expectedType))
return Enumerable.Empty<T> ();

System.Type attribType = ConvertTypeFromMeta (attribute.GetAttributeType (), provider);
Expand Down Expand Up @@ -538,7 +538,7 @@ public bool HasAttribute<T> (ICustomAttributeProvider provider) where T : Attrib
var attrib = attribs [i];
if (attrib.GetAttributeType () == attribute_type)
return true;
if (IsSubclassOf (attribute_type, attrib.GetAttributeType ()))
if (attrib.GetAttributeType ().IsSubclassOf (attribute_type))
return true;
}

Expand Down Expand Up @@ -580,10 +580,6 @@ public static ICustomAttributeProvider GetReturnTypeCustomAttributes (MethodInfo
return method.ReturnParameter;
}

static bool IsSubclassOf (Type base_class, Type derived_class)
{
return derived_class.IsSubclassOf (base_class);
}
}

public static class AttributeConversionManager {
Expand Down
2 changes: 1 addition & 1 deletion tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void SetUp ()
{
if (TestRuntime.IsInCI && TestRuntime.CheckXcodeVersion (14, 0))
TestRuntime.AssertNotDesktop (); // Looks like this particular test doesn't like Desktop + M1 bot machines
// iOS 13 and friends require bluetooth permission
// iOS 13 and friends require bluetooth permission

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added here: #17349, and autoformat disabled, so the change shows up in the next PR (yours)

if (TestRuntime.CheckXcodeVersion (11, 0))
TestRuntime.CheckBluetoothPermission (true);
//known UUID for a heart monitor, more common, we want to find something and make sure we do not crash
Expand Down