示例工程 47-sandbox-entitlements-permissions

47-sandbox-entitlements-permissions/Diagnostics/README.md

markdown · 0.4 KB

# Diagnostics
 
三个文件**故意失败**,用来复现第 47 章「报错现场」的真实诊断。
 
```bash
swiftc -typecheck Diagnostics/BookmarkStaleLiteral.swift  # error: cannot pass immutable value as inout
swiftc -typecheck Diagnostics/SearchPathString.swift      # error: cannot convert 'String' to 'SearchPathDirectory'
swiftc -warnings-as-errors -typecheck Diagnostics/UnusedSecurityScope.swift # error: result is unused
```