语言地基
类型系统与抽象
并发、内存与性能
互操作与工程
SwiftUI 基础
SwiftUI 进阶
macOS 工程
iOS
综合
附录
35-state-and-data-flow
35-state-and-data-flow/Diagnostics/BindableOnValue.swift
swift · 0.2 KB
// 故意编译失败:@Bindable 只能包装 Observable 对象。 // 复现:swiftc -typecheck Diagnostics/BindableOnValue.swift import SwiftUI struct Bad: View { @Bindable var value: Int var body: some View { Text("\(value)") } }
该文件由构建期采集,未做任何改写;源码页不进入搜索引擎索引。