[introspection] Fix macOS 10.15 version checks. (#13315)

The logic seems to want to verify MPSPredicate on maOS 10.14, but not on macOS
10.15+. But checking for macOS 10.14 is always successful on macOS 10.15+,
which means that we can't check for macOS 10.14 before checking macOS 10.15.
So I moved the macOS 10.14 check to after the macOS 10.15 check, but that made
the macOS 10.14 check redundant, because both branches of the condition did
the same thing, so I removed the whole check.

Fixes this introspectionf failure:

    [FAIL] DefaultCtorAllowed :   1 potential errors found in 1387 default ctor validated:
        Default constructor not allowed for MetalPerformanceShaders.MPSPredicate : Could not initialize an instance of the type 'MetalPerformanceShaders.MPSPredicate': the native 'init' method returned nil.
This commit is contained in:
Rolf Bjarne Kvinge 2021-11-11 16:07:51 +01:00 коммит произвёл GitHub
Родитель 28b3cf37e5
Коммит a2e2fef0c2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -203,8 +203,6 @@ namespace Introspection {
case "MetalPerformanceShaders.MPSPredicate":
// Fails on Catalina: Could not initialize an instance of the type
// 'MetalPerformanceShaders.MPSPredicate': the native 'init' method returned nil.
if (Mac.CheckSystemVersion (10, 14))
break;
if (Mac.CheckSystemVersion (10, 15))
return true;
break;