示例工程 08-structs-enums

08-structs-enums/Diagnostics/README.md

markdown · 0.4 KB

# Diagnostics
 
三个文件**故意编译失败**,用来复现第 08 章「报错现场」的真实诊断。
 
```bash
swiftc Diagnostics/MutatingLet.swift          # error: cannot use mutating member on immutable value
swiftc Diagnostics/UnboundAssociatedValue.swift # error: cannot find 'progress' in scope
swiftc Diagnostics/LazyLet.swift              # error: 'lazy' cannot be used on a let
```