示例工程 27-combine-to-async

27-combine-to-async/Diagnostics/PublishedComputed.swift

swift · 0.2 KB

// 故意编译失败:属性包装器不能用于计算属性。
// 复现:swiftc -typecheck Diagnostics/PublishedComputed.swift
import Combine
 
final class Model {
    @Published var query: String { "" }
}