‘Expression’ is ambiguous for type lookup in this context

旧iOS项目打开报错:’Expression’ is ambiguous for type lookup in this context

import SQLite

filter: Expression<Bool>? = nil, select: [Expressible] = 

原因:

The iOS 18/macOS 15 SDK now includes a new type called Expression in Foundation. This seems to just be a version of Predicate, except it can output any type, not just Bool.

处理:

This causes a name conflict with the Expression type declared in SQLite. You need to write SQLite.Expression to clarify. Or you can declare a type alias:

typealias SQLExpression = SQLite.Expression

filter: SQLite.Expression<Bool>? = nil, select: [Expressible] =

发布日期:
分类:iOS 标签:

发表评论

您的电子邮箱地址不会被公开。