From 6ca58b1ddbfd39977c3873ef775cc82f118d0a7a Mon Sep 17 00:00:00 2001 From: Louis Pontoise Date: Sat, 5 Sep 2020 15:46:26 +0900 Subject: [PATCH] fix: prevent rare crash seen in app center Stacktrace: function signature specialization of generic specialization <[__C.AXUIElementRef]> of (extension in AltTab):__C.AXUIElementRef.attribute(Swift.String, A.Type) throws -> A? AXUIElement.swift:36 --- src/api-wrappers/AXUIElement.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api-wrappers/AXUIElement.swift b/src/api-wrappers/AXUIElement.swift index 33462d26..35518520 100644 --- a/src/api-wrappers/AXUIElement.swift +++ b/src/api-wrappers/AXUIElement.swift @@ -31,7 +31,7 @@ extension AXUIElement { return try axCallWhichCanThrow(AXUIElementGetPid(self, &pid), &pid) } - func attribute(_ key: String, _ type: T.Type) throws -> T? { + func attribute(_ key: String, _ _: T.Type) throws -> T? { var value: AnyObject? return try axCallWhichCanThrow(AXUIElementCopyAttributeValue(self, key as CFString, &value), &value) as? T }