# Diagnostics 三个文件**故意编译失败**,用来复现第 31 章「报错现场」的真实诊断。 ```bash swiftc -typecheck Diagnostics/MissingViewBuilder.swift # error: type '() -> ()' cannot conform to 'View' swiftc -typecheck Diagnostics/EnvironmentKeyMissingDefault.swift # error: does not conform to protocol 'EnvironmentKey' swiftc -typecheck Diagnostics/EnvironmentIsReadOnly.swift # error: cannot assign to property: 'scheme' is a get-only property ```